Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disable buttonGroup

 
Kevin Lefebvre
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
enabled.
Any ideas on how to disable the entire group?
Thanks,
Kevin
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Kevin!
I'm moving this to the Swing / JFC / AWT forum where they just love to pour over this GUI stuff...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic