cons.gridx = 1;
serverCheckbox.addActionListener(new ActionListener() {
public void actionPerformed(@SuppressWarnings("unused")ActionEvent e) {
serverPortField.setEnabled(serverCheckbox.isSelected());
}});
<BUG>portPanel.add(serverPortField, cons);
JPanel buttonPanel = new JPanel();</BUG>
buttonPanel.setLayout(new GridBagLayout());
<BUG>JButton okButton = new JButton(OK_BUTTON);
okButton.setMnemonic('o');</BUG>
okButton.addActionListener(this);

cons.gridx = 1;
serverCheckbox.addActionListener(new ActionListener() {
public void actionPerformed(@SuppressWarnings("unused")ActionEvent e) {
serverPortField.setEnabled(serverCheckbox.isSelected());
}});
portPanel.add(serverPortField, cons);
}
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridBagLayout());
okButton = new JButton(messages.getString("guiOKButton"));
okButton.setMnemonic('o');
