1

I wonder if it is possible to make a JRadioButton unclickable? I have implemented some functions in an application, but i would still like to show the name of the functions yet to be implemented. The user chooses from a JRadioGroup so i'd like to add all the functions as radiobuttons and then make some of them unclickable, but so far i have not been able to figure out how.

Regards Jesper

Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
gedemagt
  • 657
  • 1
  • 9
  • 22

2 Answers2

4

Make the JRadioButton disabled using following Code

Sample Code

    JRadioButton butt = new JRadioButton( "Button 1: " );
    butt.setEnabled( false );
3

Try using: setEnabled

This can enable / disable any component.

sdasdadas
  • 23,917
  • 20
  • 63
  • 148