Making your class an event source in Java
- by Crystal
I'm making a custom button in Java that has two states, mousePressed, and mouseReleased. At the same time, if I wanted to reuse this button, so that other event listeners can register with it, are these the appropriate steps I should do:
override addActionListener(ActionListener action)
override removeActionListener(ActionListener action)
have a…