I have, through the kind help of some of the people here, figured out some of my problems in learning swing. But, now, I am having trouble with getting an inner class to see objects in the outer class. What is wrong with my syntax that is causing this? Thanks in advance for your help.
mainButton is a local variable declared in the constructor of the outer class. Local variables are only visible inside the method that declares them. If you want MainButtonListener to see it, make it into a member variable of the class -- i.e., declare it at class scope, and then assign it in the constructor as now.