@Override protected void init(String text, Icon icon) { model = createButtonModel(); setModel(model); addActionListener(this); super.init(text, icon); }
final TristateCheckBox tristateCheckBox = new TristateCheckBox(); tristateCheckBox.setState(selectionAdmin.getState(index)); tristateCheckBox.addActionListener(new TristateCheckboxListener(index)); tristateCheckBoxes[index] = tristateCheckBox; spectraPanel.add(tristateCheckBox);