在java中如何设置textfield、button或其他组件里头字体的颜色呢?
以红色(RED)为例:
组件.setForeground(Color.RED)//设置文字的颜色(即前景色)。
而设置背景色则是:
组件.setBackground(Color.RED)//设置背景色。
在java中如何设置textfield、button或其他组件里头字体的颜色呢?
以红色(RED)为例:
组件.setForeground(Color.RED)//设置文字的颜色(即前景色)。
而设置背景色则是:
组件.setBackground(Color.RED)//设置背景色。