🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.gui
Article #43

Re: Problem with the ButtonGroup

#43
From: Michael Raymond
Date: Fri, 14 Jan 2000 00:00
43 lines
2078 bytes
I haven't coded this problem myself but i thought

ButtonGroup.setSelected(null, true);

would do the trick.  You can set up the group so initially no button is
selected but once a user selects a button, as far as im aware, there is no
API support for deselecting all the buttons in the group. The above line of
code should work though.

All the best,
Michael.

George Wilson Mathias wrote:

> Hello All,,
>
> I fixed it with a work around.
>
> What I did, I removed all the buttons from the group first and then
> Deselected one by one and then added them back to the group. It worked
> great.
>
> George Mathias
>
> George Wilson Mathias wrote:
>
> > Hello all,
> >
> > I have a buttonGroup, which has 3 buttons associated with it. User
> > selects one of the button in that group and if User selects "Undo" all
> > the buttons must be deselcted. I tried to use button.setSelected(false)
> > to all three buttons, didn't seem to work. Then I said :
> >
> > buttonGroup.setSelected(new DefaultButtonModel(), false); This didn't
> > work either.
> >
> > Can you please tell me how can I de-select all the buttons in a Button
> > programmatically. This is really bugging me for a while now.
> >
> > Thanks a lot in-advance.
> >
> > George Mathias
> > george.mathias@wcom.com
Technical Details
Message-ID: <387E7194.8CB25967@michelob.co.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <387DFF96.CACBE2B6@mci.com> <387E3972.A277A681@mci.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,45995627a1156786
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,45995627a1156786
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: 10a146,45995627a1156786
X-Google-Attributes: gid10a146,public
From: Michael Raymond <mraymond@michelob.co.au>
Subject: Re: Problem with the ButtonGroup
Date: 2000/01/14
Message-ID: <387E7194.8CB25967@michelob.co.au>
X-Deja-AN: 572356309
Content-Transfer-Encoding: 7bit
References: <387DFF96.CACBE2B6@mci.com> <387E3972.A277A681@mci.com>
Organization: The Internet Group Ltd
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: comp.lang.java.gui,borland.public.jbuilder.java.swing,comp.lang.java.programmer