Code example for JLabel

Methods: setLabelFor

0
        filenamePanel.add(localFile, BorderLayout.CENTER);
        return filenamePanel;
    } 
 
    private JPanel createLocalFileContentsPanel() {
        JLabel label = new JLabel(JMeterUtils.getResString("ftp_local_file_contents")); //$NON-NLS-1$
 
        inputData = new JTextArea();
        label.setLabelFor(inputData);
 
        JPanel contentsPanel = new JPanel(new BorderLayout(5, 0));
        contentsPanel.add(label, BorderLayout.WEST);
        contentsPanel.add(inputData, BorderLayout.CENTER);
        return contentsPanel;
    } 
 
    private JPanel createRemoteFilenamePanel() {
        JLabel label = new JLabel(JMeterUtils.getResString("ftp_remote_file")); //$NON-NLS-1$
 
        remoteFile = new JTextField(10);