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 8 of 11 Topic 16060 of 16269
Post > Topic >>

Re: JToggleButton event firing

by Redbeard <tom.cowdery@[EMAIL PROTECTED] > May 10, 2008 at 08:46 PM

On May 8, 10:43 am, Knute Johnson <nos...@[EMAIL PROTECTED]
>
wrote:
<snip>
> Do you need keyboard input, is that why you want an ActionListener?
No, I don't need keyboard input.  I just envisioned it reacting like a
button, and figured that it was easier to subclass JToggleButton than
reinvent the wheel.  Of course, when I decided to subclass
JToggleButtion, I wasn't aware of the behavior that prompted my
original post.  I discovered that by accident.

> Why
> don't you explain completely what you want your button to do?
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.
 




 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 Sat Jul 26 4:59:38 CDT 2008.