At 10:09 AM 3/9/2001, Josh Howe wrote:
>I'm pretty new to Java and to Swing, so I appologize if this is a dumb
>question.
Not at all. At least compared to all other questions posted to this, where
the most common answer is RTFM. Plus, you didn't cross post to
advanced-swing, for which I commend you :)
>I'm looking at the source code for DefaultButtonModel and
>AbstractButton. I'm confused because they both seem to have their own
>versions of fireActionPerformed. Why would you ever add an actionListener to
>a button's model? Thanks!
The AbstractButton tries to shield a user from having to deal with the
ButtonModel. It is the model that fires the original action events, but
notice that you can register your action listeners with the button object
instead and still receive them. This is because the button object
registers itself as an action listener on its model, picks up the action
events and forwards them on to its own listeners.
Cheers
Dmitry
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing