Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2004

Tip: Looking for answers? Try searching our database.

How to put a ButtonGroup on a Frame?

Thread view: 
Zalek Bloom - 03 Apr 2004 04:02 GMT
I was looking through manuals and examples but I couldn't find how to put a
ButtonGroup on a Frame. For example:

Frame fr = new Frame();

JRadioButton r1 = new JRadioButton("Dec");
JRadioButton r2 = new JRadioButton("Hex");
JRadioButton r3 = new JRadioButton("Oct");
JRadioButton r4 = new JRadioButton("Bin");

ButtonGroup g1 = new ButtonGroup();

Now - how do I put ButtonGroup on a Frame?

Thanks,

Zalek
Knute Johnson - 03 Apr 2004 19:33 GMT
> I was looking through manuals and examples but I couldn't find how to put a
> ButtonGroup on a Frame. For example:
[quoted text clipped - 13 lines]
>
> Zalek

You don't put the ButtonGroup on the frame just the JButtons.  You add
the buttons to the ButtonGroup and that is what makes them act together
as a group.

Signature

Knute Johnson
email s/nospam/knute/
Molon labe...

Andrew Thompson - 04 Apr 2004 08:15 GMT
> I was looking through manuals and examples but I couldn't find how to put a
> ButtonGroup on a Frame. For example:

I think you will find you add the
buttons themselves to a frame.  

Check the link in the API docs for
ButtonGroup.  That will probably
set you right.

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Andrew Thompson - 04 Apr 2004 08:17 GMT
> I was looking through manuals and examples but I couldn't find how to put a
> ButtonGroup on a Frame. For example:

That link mentioned last post, in case
you are looking at vastly different JDocs..
<http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#radiobutton>

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.