• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error! Actionlisteneres -HELP!  RSS feed

 
Naf Rash
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error:
ErrorCannot refer to a non-final variable tableName inside an inner class defined in a different method
Does this mean that when you have an inner class that the methods within that are not allowed to use actionListeners? Is this normal when programming in Java?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You'll just need to design your code a little differently.
The error message means exactly what it says. A non-final local (method) variable is not accessible to any class also defined in that method. For example, the following is not allowed.
If you were to post some relevant code of what you're working on, I'm sure folks 'round here would be able to nudge you in the right direction.
[ February 24, 2004: Message edited by: Dirk Schreckmann ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!