setForeground(Color.RED);. ボタンの背景色を設定するには JButton クラスの親クラスである JComponent クラスで用意されている setBackground メソッドを使います。
確定! 回上一頁