users.setBounds(550, 20, 150, 30);
users.addActionListener(new ActionListener() {
@Override
public void actionPerformed (ActionEvent e) {
if (users.getSelectedIndex() == 1) {
ProfileAdderDialog p = new ProfileAdderDialog(getInstance(), true);
users.setSelectedIndex(0);
p.setVisible(true);
}
edit.setEnabled(users.getSelectedIndex() > 1);
}
});
edit.setText(I18N.getLocaleString("EDIT_BUTTON"));
edit.setBounds(480, 20, 60, 30);
edit.setVisible(true);
edit.setEnabled(users.getSelectedIndex() > 1);
edit.addActionListener(new ActionListener() {
@Override
public void actionPerformed (ActionEvent event) {
if (users.getSelectedIndex() > 1) {
ProfileEditorDialog p = new ProfileEditorDialog(getInstance(), (String) users.getSelectedItem(), true);
users.setSelectedIndex(0);
p.setVisible(true);
}
edit.setEnabled(users.getSelectedIndex() > 1);
}
});