In this snippet I think I declared textArea before so why am I getting a syntax error?
Output:
Exception in
thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
ActionListener cannot be resolved to a type
at homenetwork.bkr.training.TextComponentFrame.<init>(TextComponentFrame.java:35)
at homenetwork.bkr.training.TextComponentTest$1.run(TextComponentTest.java:14)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
NOTE: The
tags don't seem to work for bold.