At 06:22 PM 3/7/2001 +0100, Perico wrote:
>Is there some way to get the JButton associated with a
>certain ButtonModel?.
No, for the simple reason that a single ButtonModel may be associated
with multiple JButtons. (Or even things which aren't buttons, for
that matter.)
(If you happen to know that the ButtonModel is an instance of
DefaultButtonModel, you could try getting its ButtonGroup, and then
get all the Buttons in the ButtonGroup, which all should be using
that model. But this only works for things like radio buttons, and
probably doesn't apply to your case.)
Whatever object is using the ButtonModel will have to keep special
track of the JButton(s) using it.
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing