- #1
BiGyElLoWhAt
Gold Member
- 1,622
- 131
I am writing a program, and only care about one abstract method in window listener: windowClosing(windowEvent e){}
Because of this, I would like to write a new interface windowSomthingCleverNameWise that extends window listener and does nothing with all of the methods except for windowClosing, which would be abstract. This would clean up my code a lot. I am likely to use multiple interfaces in this project, and would like to keep the actual code as neat as possible. Plus, this way I'll always have it.
Basically, what I'm looking for is a catcher for all the useless methods that I have to override. Extending is not an option, as I already extend JFrame in my class. I need something I can implement.
*Edit
WindowListener has 7 methods that need to be implemented. Just annoying to look at while coding, and I'm sure my prof would get annoyed looking at all this crap as well.
Because of this, I would like to write a new interface windowSomthingCleverNameWise that extends window listener and does nothing with all of the methods except for windowClosing, which would be abstract. This would clean up my code a lot. I am likely to use multiple interfaces in this project, and would like to keep the actual code as neat as possible. Plus, this way I'll always have it.
Basically, what I'm looking for is a catcher for all the useless methods that I have to override. Extending is not an option, as I already extend JFrame in my class. I need something I can implement.
*Edit
WindowListener has 7 methods that need to be implemented. Just annoying to look at while coding, and I'm sure my prof would get annoyed looking at all this crap as well.