Ask coding questions

← Back to all posts
Why is it giving me this error?
temporarilyMe (0)

I have ran this code on Windows 10 with Eclipse and it worked. But on repl it is throwing an error:

Frame.java:9: error: cannot find symbol public class Frame extends JFrame implements ActionListener ^ symbol: class ActionListener Frame.java:46: error: method does not override or implement a method from a supertype @Override ^ 2 errors compiler exit status 1

How do I solve this?

Answered by Coder100 (16840) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (16840)

did you forget to import ActionListener?

temporarilyMe (0)

@Coder100 I did. I cannot believe I made that mistake.

MocaCDeveloper (560)

My guess,Frame is pre-imported within the IDE you use. Meanwhile, Repl requires you to import it manually into your program.

So, try importing the module "Frame" into your program.