public class MyJRadioButton extends JRadioButton { public MyJRadioButton(String text) { super(text); this.setForeground(Color.blue); } public void setEnabled(boolean enable) { if (enable) { this.setForeground(Color.blue); } else { this.setForeground(Color.gray); } super.setEnabled(enable); }