posted 15 years ago
The only way to not have to implement all methods is to extend MouseAdapter or MouseInputAdapter. That will not be possible for you since you already extend JDialog, so you have three options:
1) implement all methods.
2a) don't let your JDialog implement MouseListener, but use an inner class (use our search or Google if you are not familiar with it) instead.
2b) like 2a but use an anonymous inner class (again, the search and Google are your friends) instead of a regular one.
I would definitely check out how 2a and 2b work, because having your GUI class be its own listener is not a good practice. Not only will you always have to implement all listener methods, but it also allows other classes to use it as a listener for their components. That's not something you want.