Code example for JLabel

Methods: setLabelFor

0
    /*************************************************************************** 
     * This will create the servername panel in the LdapConfigGui 
     **************************************************************************/ 
    private JPanel createServernamePanel() {
        JPanel serverPanel = new JPanel(new BorderLayout(5, 0));
        JLabel label = new JLabel(JMeterUtils.getResString("servername")); // $NON-NLS-1$
        label.setLabelFor(servername);
        serverPanel.add(label, BorderLayout.WEST);
        serverPanel.add(servername, BorderLayout.CENTER);
        return serverPanel;
    } 
 
    /*************************************************************************** 
     * This will create the port panel in the LdapConfigGui 
     **************************************************************************/ 
    private JPanel createPortPanel() {
        JPanel portPanel = new JPanel(new BorderLayout(5, 0));
        JLabel label = new JLabel(JMeterUtils.getResString("port")); // $NON-NLS-1$
        label.setLabelFor(port);
        portPanel.add(label, BorderLayout.WEST);