Best way to implement an ActionListener.

Hi all, basically, I have two classes. One which creates my GUI with Swing, and one which will handle all of my logical operations. What I want to know is, what is the best way of implementing the ActionListener? I have the following in my GUI class

Am I best off doing this multiple times in the class, or am I better off using an inner class?

Not to be glib, but you're better off using whatever you think works best for the situation. Myself, if I have a button with a unique independent action, I usually use an anonymous inner class. If I have a bunch of buttons whose actions require the same logic, such as the numeric buttons of a calculator, I have them share the same ActionListener, possibly one implemented as a private inner class or a stand-alone class. If my logic is in another class, then I sometimes have the actionPerformed call the model's method.

Please understand that I'm no expert and am not saying that my opinion is the only correct one, and in fact far from it.

Not to be glib, but you're better off using whatever you think works best for the situation. Myself, if I have a button with a unique independent action, I usually use an anonymous inner class. If I have a bunch of buttons whose actions require the same logic, such as the numeric buttons of a calculator, I have them share the same ActionListener, possibly one implemented as a private inner class or a stand-alone class. If my logic is in another class, then I sometimes have the actionPerformed call the model's method.

Please understand that I'm no expert and am not saying that my opinion is the only correct one, and in fact far from it.

Thanks for the response, from that I take it I am best off carrying on the way I am? The methods that I will be invoking are not all "the same" as entering digits on a calculator would be. Also, what do you mean by an "anonymous" inner class?