Sure.a Class can be its own event handler. For an example could be a class that extends Jbutton and implements ActionListener. In the actionPerformed method, put the code to perform when the button is pressed.
Interview Questions and Answers pdf free download for freshers beginners experienced, Multiple Choice Questions with Answers Practice, Placement Papers