Article View: borland.public.jbuilder.java.swing
Article #910Re: buttonGroup
From: Paul Furbacher [TeamB]
Date: Mon, 22 Nov 2004 21:14
Date: Mon, 22 Nov 2004 21:14
46 lines
2606 bytes
2606 bytes
Lori M Olson [TeamB] wrote:
> Paul Iddon wrote:
>>
>> Im new to Jbuilder and i was wondering why when I select the buttonGroup
>> component it does not show in my design, or in the final product.
>
> A button group is just a conceptual object. It is not a visual
> component, per se. It is used to add *behavior* to a set of (usually)
> radio buttons, such that only one button can be "selected" at a time.
>
> If you want to visually group your buttons, you need to create a panel
> and add those buttons to the panel. And maybe add a nice beveled,
> titled border to the panel.
Just had an idea after all these years of
manually adding buttons to a button group:
Create a descendent of JPanel, override the
"addImpl(...)" method, calling super.addImpl(...),
and then adding the component, if an instanceof
JButton, to a ButtonGroup member. Add a getButtonGroup()
method to the special panel.
There are other implementation details, but
that might be a good start.
This way, after adding this component to the
Palette, you could do what you want to do
in the Designer.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Technical Details
Message-ID:
<41a256cf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41a21a3b$1@newsgroups.borland.com> <41a2219f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,9340318334e86a06 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 22 Nov 2004 16:14:55 -0500 From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com> Organization: Reverse Alchemy, Inc. User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: buttonGroup References: <41a21a3b$1@newsgroups.borland.com> <41a2219f$1@newsgroups.borland.com> In-Reply-To: <41a2219f$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.142.222.65 Message-ID: <41a256cf$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101158095 69.142.222.65 (22 Nov 2004 13:14:55 -0700) Lines: 46 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail