JButton button = new JButton("Drück mich!"); button.addActionListener(new MyButtonListener());
class MyButtonListener implements ActionListener { }
public void actionPerformed(ActionEvent e) { // tauscht Liste der ComboBox aus switchList(); }