I have one class called HyperlinkEventMonitor that implements a HyperlinkListener. I want to extend this class so that it handles both hyperlink events and mouseevents. I tried creating a superclass but I’m not doing this right because I can’t compile the code. Can someone show me how to do this.
For example: I tried
class MouseHyperLink extends HyperlinkEventMonitor, implements MouseListener {
}
But this is wrong.
How can I do this?
Thank you,
Elliott
Without further information on the error message I’ll guess that it is the comma-character that messes things up. Try removing the comma-character:
Also, make sure that you implement all methods of
MouseListener.If you don’t want to implement all methods in
MouseListener(and defer that to the subclass) you’ll have to make the class abstract: