- 688 名前:デフォルトの名無しさん mailto:sage [2009/11/09(月) 22:07:29 ]
- class SampleActionListener implements ActionListener
{ public void actionPerformed(ActionEvent e) { tmp=(JRadioButton) e.getSource(); lb.setText(tmp.getText() + "を選びました。"); if(){ lb.setForeground(Color.white); } else{ lb.setForeground(Color.black); } } } 質問です。ラジオボタンが2つあって、それぞれ押すと色が変わるようにしたいんですが ifの括弧に何を入れればいいんでしょうか。
|

|