Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2021

radioButton without radio

From Wenj.Ma@gmail.com.remove-dii-this
Subject radioButton without radio
Message-ID <1184258210.682847.275140@g4g2000hsf.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:36 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hi,

I want to create a group of buttons with radiobutton functionality
(exclusive to each other) but I don't want that radio in front of each
button. I want those buttons look like normal JButton. In addition, I
specify 2 colors for the button when selected and unselected. But I
don't know how to make one button use unselected color when another
button is pressed and this button got unselected by the radio button
logic.

I've add a group of JButton instances to the ButtonGroup and
addActionListener for user mouse press on one button and it got
selected, it runs but when another button is pressed, the previous
selected button still use the SELECT_COLOR, it can't change to
UNSELECT_COLOR.

How to do that?extend the buttonModel or radioButton / toggleButton?

Thanks

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

radioButton without radio Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
  Re: radioButton without r "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
    Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
      Re: radioButton without r "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
        Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
  Re: radioButton without r "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
    Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
      Re: radioButton without r "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
        Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
          Re: radioButton without r "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
            Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
              Re: radioButton without r "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
  Re: radioButton without r "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
    Re: radioButton without r Wenj.Ma@gmail.com.remove-dii-this - 2011-04-27 15:36 +0000
      Re: radioButton without r "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000

csiph-web