字体颜色的设置
if(e.getActionCommand().equals("字体颜色")){
Color c=JColorChooser.showDialog(this,"请选择文字颜色",Color.BLACK);
sendArea.setForeground(c);
sendArea.requestFocusInWindow();
msgListArea.setForeground(c);
msgListArea.requestFocusInWindow();
}
sendArea是发送区域;msgListArea是显示信息的区域。
为什么在设置字体颜色时,发送区域不显示字体的颜色,只有显示区域显示字体的颜色