🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10657

How to use a buttongroup on a JToolBar

#10657
From: Dave Ludwig
Date: Wed, 25 Aug 1999 00:00
18 lines
1043 bytes
I've got 2 buttons on a JToolBar (I could use a ButtonBar if
necessary).  I need the currently selected one to stay depressed.  So I
tried:

    ButtonGroup buttonGroup1 = new ButtonGroup();

    buttonGroup1.add(viewCButton);
    buttonGroup1.add(viewBoButton);
    toolBar.add(buttonGroup1);

but it won't add the buttonGroup to the JToolBar.  It doesn't work for a
ButtonBar either.  What can I do?  Thanks

--
/*************************\
Dave Ludwig
davel@sisconet.com
\*************************/
Technical Details
Message-ID: <37C4422D.66A4623C@sisconet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,8570aac81751c3a8,start
X-Google-Attributes: gid111d45,public
From: Dave Ludwig <davel@sisconet.com>
Subject: How to use a buttongroup on a JToolBar
Date: 1999/08/25
Message-ID: <37C4422D.66A4623C@sisconet.com>
X-Deja-AN: 517138692
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing