Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: JToggleButt...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 11 Topic 16060 of 16269
Post > Topic >>

Re: JToggleButton event firing

by Redbeard <tom.cowdery@[EMAIL PROTECTED] > May 11, 2008 at 06:58 PM

On May 11, 11:48 am, "John B. Matthews" <nos...@[EMAIL PROTECTED]
> wrote:
> In article
> <cd26e5b0-3633-4c3f-934b-404d4edeb...@[EMAIL PROTECTED]
>,
Redbeard <tom.cowd...@[EMAIL PROTECTED]
> wrote:
>
> [...]
>
> > I did.  It represents a "card" in the Memory game - sometimes called
> > 'Concentration' after the TV show based on the Memory game.  When
> > someone clicks on the "card" it is "turned over" to reveal the face.
> > Since JToggleButton already had the ability to hold two images - one
> > which could be the back of the card and the other the fact - it seemed
> > like a obvious choice.  But as I said earlier, I wasn't aware of the
> > behavior that prompted this thread.
>
> > Since nobody else has chimed in with a way to override that behavior,
> > I have to assume that nobody is aware of any way to do so.  (Which may
> > mean that there isn't any way.)  So it looks like I "roll my own" and
> > subclass JPanel.
>
> I think it's the ToggleButtonModel that's responsible for the behavior.
> Why not instantiate JToggleButton and set the model to an extension of
> DefaultButtonModel that overrides isArmed().
>
> John
> --
> John B. Matthews
> trashgod at gmail dot com
> home dot woh dot rr dot com slash jbmatthews

Sounds like an idea that is worth a try.  Thanks!
 




 11 Posts in Topic:
JToggleButton event firing
Redbeard <tom.cowdery@  2008-05-07 19:18:08 
Re: JToggleButton event firing
Mark Space <markspace@  2008-05-07 19:55:34 
Re: JToggleButton event firing
Redbeard <tom.cowdery@  2008-05-07 20:25:13 
Re: JToggleButton event firing
Knute Johnson <nospam@  2008-05-07 22:17:56 
Re: JToggleButton event firing
Roedy Green <see_websi  2008-05-11 12:00:34 
Re: JToggleButton event firing
Redbeard <tom.cowdery@  2008-05-08 04:27:53 
Re: JToggleButton event firing
Knute Johnson <nospam@  2008-05-08 08:43:16 
Re: JToggleButton event firing
Redbeard <tom.cowdery@  2008-05-10 20:46:56 
Re: JToggleButton event firing
"John B. Matthews&qu  2008-05-11 12:48:37 
Re: JToggleButton event firing
Redbeard <tom.cowdery@  2008-05-11 18:58:53 
Re: JToggleButton event firing
"John B. Matthews&qu  2008-05-12 08:42:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:16:29 CDT 2008.