Re: Action Listener, Determing which button was pressed



Thomas Hawtin wrote:
ossie.moore@xxxxxxxxx wrote:
Here here. Separate listeners for each button in many situations is
stunningly inefficient and confusing.

Really?? Are you referring to class loading time? I would be surprised if that makes any significant difference in this day and age. I'm confused by the idea that it's confusing.

Tom Hawtin

You said better, I said less confusing, I think we both have preferences. It is my preference to group the event handling together if I have more than a couple of related events. I usually do that when I create a frame with a bunch of menus. I like the menu creation code together and the event processing code together. Less confusing for the unimaginative like me :-).

--

Knute Johnson
email s/nospam/knute/
.


Loading