- LinkedList<ActionListener> listeners;
-
- public void addActionListener(ActionListener l) {
- listeners.add(l);
- }
-
- public void actionPerformed(ActionEvent e) {
- channel = getSelectedIndex();
-
- ActionEvent newe = new ActionEvent(this, channel, e.getActionCommand());
-
- ListIterator<ActionListener> i = listeners.listIterator();
-
- while (i.hasNext()) {
- ActionListener listener = i.next();
- listener.actionPerformed(newe);
- }
- setMaximumSize(getPreferredSize());
- }