For a method local variable to be accessible in an inner class, it must be declared final. Since the instance of the anonymous inner class may continue to exist after the method has exited, it makes its copy of the variable. So the value of the variable must not change.
There are no new questions, but there may be new answers.
subject: How to pass variables to actionPerformed method