Originally Posted by
Ike
I have two JButtons, and app is supposed to do one thing when button1 is pressed, and another thing when button2 is pressed.
I already know how to do this with just one button, but have no idea how to create two handlers, for one button each like:
go1.addActionListener(handler1);
go2.addActionListener(handler2);
There are some explanations out there, but they all use keyword 'this', so in general not much helpful, since I don't know what that means although I've been trying for months.
So if anyone can explain this without using 'this' it would be very helpful.