gedemagt
gedemagt

Reputation: 697

Make a JRadioButton unclickable

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

Upvotes: 1

Views: 1158

Answers (2)

Make the JRadioButton disabled using following Code

Sample Code

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

Upvotes: 4

sdasdadas
sdasdadas

Reputation: 25096

Try using: setEnabled

This can enable / disable any component.

Upvotes: 3

Related Questions