• Post Reply Bookmark Topic Watch Topic
  • New Topic

Event Manager Compile Problem  RSS feed

 
Atrus Greyor
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following code I have a simple GUI with several buttons. Without the event listeners it works fine, but when I add the listeners and compile I get the error message illegal start of expression--public void actionPerformed(ActionEvent evt);

Here is the code that has been causeing the problems


If anyone could help me with this problem it would be greatly appreciated.

Thanks!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Move the actionPerformed method outside of the MainMenu method.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!