void update(String group) { myTitleLabel.setText( "<html><body><h2 style=\"text-align:left;\">" + group + "</h2></body></html>"); myContentPanel.removeAll(); List<IdSet> idSets = PluginGroups.getInstance().getSets(group); for (final IdSet set : idSets) { final JCheckBox checkBox = new JCheckBox(set.getTitle(), PluginGroups.getInstance().isIdSetAllEnabled(set)); checkBox.setModel( new JToggleButton.ToggleButtonModel() { @Override public boolean isSelected() { return PluginGroups.getInstance().isIdSetAllEnabled(set); } }); checkBox.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { PluginGroups.getInstance().setIdSetEnabled(set, !checkBox.isSelected()); CustomizePluginsStepPanel.this.repaint(); } }); myContentPanel.add(checkBox); } }