jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes How to disable buttonGroup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to disable buttonGroup" Watch "How to disable buttonGroup" New topic

How to disable buttonGroup

Kevin Lefebvre

Joined: Feb 17, 2003
Posts: 2
I am looking for a way to disable a buttonGroup, but can
not seem to find a disable option. Basically what I am looking for
is to have the entire group disabled (grayed out) When the user
has enters information into a text field then I want the buttonGroup
Any ideas on how to disable the entire group?
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Kevin!
I'm moving this to the Swing / JFC / AWT forum where they just love to pour over this GUI stuff...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You can get an Enumeration of all the buttons by calling getElements() on the ButtonGroup. Just loop through this Enumeration and call setDisabled( false ) on all of them.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
It is sorta covered in the JavaRanch Style Guide.
subject: How to disable buttonGroup
It's not a secret anymore!