请问这段Code如何实现在BUTTON CLICK事件中改变BUTTON BACKCOLOR? 设置Button的颜色?redButton.setBackground(Color.blue); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是不是这样:? public void actionPerformed(ActionEvent event) { ButtonPanel.this.setBackground(backgroundColor); Component[] buttonArray=ButtonPanel.this.getComponents(); for(int i=0;i<buttonArray.length;i++) ((JButton)buttonArray[i]).setBackground(Color.lightGray); JButton button=(JButton)event.getSource(); button.setBackground(backgroundColor); repaint(); } java程序如何让他开机自动运行 关于给TextCellEditor添加Content assist的问题 关于TCP的一个疑问 不久前才接触编程 有几个问题 望前辈指点 Javamail 发件人乱码问题! 高手指教 一个关于jsp和jdbc的问题 请教!!!如何弹出一个固定显示模式的消息框呢??? 我不信,BCB上就没有了高手!如真不能解决,耻辱! 有关LIST的问题! 一个jdbc奇怪的问题 把分献给回答问题最清楚的那个人(对于你来说,可能超级简单) 初学者问题,希望大家指导指导
public void actionPerformed(ActionEvent event)
{
ButtonPanel.this.setBackground(backgroundColor);
Component[] buttonArray=ButtonPanel.this.getComponents();
for(int i=0;i<buttonArray.length;i++)
((JButton)buttonArray[i]).setBackground(Color.lightGray);
JButton button=(JButton)event.getSource();
button.setBackground(backgroundColor);
repaint();
}