ActionListeners' listen for ActionEvents, so you have to set the ActionListener outside of the actionPerformed() method, otherwise the method will never be called.
So how do i add a method which adds an action listener to the GUI and is called by the controller class, passing a class from the controller as an argument?
Ok I know that NetBeans provides a method which is invoked when an action listener is added to the form, what i'm trying to do is use MVC, make a controller class which accepts a GUI and a business logic class, and invokes methods on the GUI passing it's own class as an argument to be performed, as in this guide.
Any ideas folks?
Thanks,
Rob.
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, the permaculture playing cards