button.addActionListener(this) and static methods
843807Apr 29 2005 — edited May 1 2005I'm trying to make a gui program in which the gui is set up in the main method. Everything works fine except for the button I use. When I try to add it to the actionListener, I get the error "non-static variable this cannot be referenced from a static context". How can I work around this?