Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jbutton refresh

 
mickey hendrix
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello to everybody....
I have a problem when i select a radiobutton...
I have 2 radio butto on a ButtonGroup and when I select one of this......
I want for another event ( combo,button ) to reset the to button ALL disabled but It seems not to go all righ and the selection remains.....How can I refresh to a disabled status all the 2 radiobutton?
thanks for help......
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create an extra radiobutton, add it to the buttongroup,
but do NOT add it to any container (i.e invisible)

when you want to have both of the 'visible' radiobuttons showing 'not selected',
have this line in your code

[extraRadioButton].setSelected(true);
 
mickey hendrix
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is a very good idea...thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic