"...not abstract and does not override abstract method..."
Joined: Nov 29, 2006
Thanks for all the help from the experienced Java folks that I have received on this forum so far. I am still working on getting a text string from the user into my code. Since I am using J-Link with Pro/Engineer CAD software I cannot use "JOptionPane.showInputDialog" or similar because the window always shows up behind my main application window.
As a result I am forced to build my own dialog from scratch. This successfully displays the dialog window; but, the text from the text field is not successfully read into the string variable. In order to alleviate this problem I am attempting to implement an ActionListener.
At compile time, I receive the error message: "Jerry_Test is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener"
Any help would be greatly appreciated. Here is my code:
As the error message says, Jerry_Test declares that it "implements ActionListener", but it does not; the class JerryTest doesn't implement the method "actionPerformed" declared in that interface.
Since you're using an anonymous class as your actual listener, Jerry_Test doesn't need to implement this interface for any reason, anyway, so just remove those two words "implements ActionListener" and you'll be good.
Do you have an intro Java programming text? Java isn't a scripting language where you can copy a line from here and a line from there; it really, really helps to have some understanding of what you're writing.