JLable中如何设置字体颜色?
JLable jb = new JLabel();
jb.setText("我爱JAVA");
要把jb当中的文字设置成红色怎么实现?
------解决方案--------------------
setForeground  
public void setForeground(Color fg)设置此组件的前景色。
由外观来决定是否遵守此属性,某些外观可以选择忽略它。  
覆盖:  
类 Component 中的 setForeground  
参数:  
fg - 所需的前景 Color  
JLabel l1 = new JLabel("red");  
l1.setForeground(Color.red);