use of jmri.jmrit.roster.swing.RosterGroupComboBox in project JMRI by JMRI.
the class RosterGroupTableAction method actionPerformed.
public void actionPerformed() {
// create the JTable model, with changes for specific NamedBean
createModel();
// create the frame
f = new RosterGroupTableFrame(m, helpTarget()) {
/**
* Include an "add" button
*/
@Override
void extras() {
final JComboBox<String> selectCombo = new RosterGroupComboBox();
selectCombo.insertItemAt("", 0);
selectCombo.setSelectedIndex(-1);
JPanel p25 = new JPanel();
p25.add(new JLabel(Bundle.getMessage("SelectRosterGroup")));
p25.add(selectCombo);
addToTopBox(p25);
selectCombo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
comboSelected(e, selectCombo.getSelectedItem().toString());
}
});
selectCombo.setVisible(true);
}
};
setTitle();
addToFrame(f);
f.pack();
f.setVisible(true);
}
Aggregations