字体颜色的设置

jingpinkecheng111 2011-12-01 09:11:16
if(e.getActionCommand().equals("字体颜色")){
Color c=JColorChooser.showDialog(this,"请选择文字颜色",Color.BLACK);
sendArea.setForeground(c);
sendArea.requestFocusInWindow();
msgListArea.setForeground(c);
msgListArea.requestFocusInWindow();


}
sendArea是发送区域;msgListArea是显示信息的区域。
为什么在设置字体颜色时,发送区域不显示字体的颜色,只有显示区域显示字体的颜色
...全文
97 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jingluo 2011-12-01
  • 打赏
  • 举报
回复
sendArea.updateUI()试试
gongxiaopan 2011-12-01
  • 打赏
  • 举报
回复
chuilaizadao

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧