Article View: borland.public.jbuilder.java.swing
Article #12152Re: How to 'unite' 2 radio buttons
From: Anne Nortcliffe
Date: Thu, 18 Feb 1999 00:00
Date: Thu, 18 Feb 1999 00:00
23 lines
1353 bytes
1353 bytes
You need to add the radio buttons to a ButtonGroup, try this;
First declare the variables;
ButtonGroup but1=new ButtonGroup();
JRadioButton jRadioButton1=new JRadioButton();
JRadioButton jRadioButton2=new JRadioButton();
then in the implentation....
but1.add(jRadioButton1);
but1.add(jRadioButton2);
then just put the buttons where you want them....
C Javier Castro Pe�a wrote:
> I need to have 2 radio buttons, so only one can be clicked at a time.
> Jbuilder allows to put 2 separated radio buttons, how can I link them? I
> want to do something such as the checkbox panel from jbcl, but
> lightweight (that's why I am not using it).
>
> (please, forward answer to jcaspen@iname.com)
Technical Details
Message-ID:
<36CBFA5F.B47E940C@sheffield.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36C4DB52.12499D7C@ittc.ukans.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,889acf4e0eb535e8 X-Google-Attributes: gid111d45,public From: Anne Nortcliffe <cop94aln@sheffield.ac.uk> Subject: Re: How to 'unite' 2 radio buttons Date: 1999/02/18 Message-ID: <36CBFA5F.B47E940C@sheffield.ac.uk> X-Deja-AN: 445663188 Content-Transfer-Encoding: 8bit References: <36C4DB52.12499D7C@ittc.ukans.edu> To: "C Javier Castro Pe�a" <jcaspen@ittc.ukans.edu> Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing