- Returning a JButtons action listener so another class can use it
- public JButton button() {
- return button;
- }
- buttonClass.button().addActionListener(new buttonActionListener());
- public class buttonActionListener implements ActionListener {
- public void actionPerformed(ActionEvent e) {
- //local method calls
- }
- }