java有关applet的一个小问题
怎样设置applet小程序的文字颜色,比如applet显示“this is a test”,设置为红色。 谢谢。本人菜鸟..
[解决办法]
首先,你的字是怎么显示的,是在Label上还是在Panel上
Label上用setForeground设置
Panel上通过paint方法实现,Graphics的drawString来显示,颜色用Graphics的setColor来设置
发布时间: 2012-07-29 15:26:14 作者: rapoo
java有关applet的一个小问题
怎样设置applet小程序的文字颜色,比如applet显示“this is a test”,设置为红色。 谢谢。本人菜鸟..
[解决办法]
首先,你的字是怎么显示的,是在Label上还是在Panel上
Label上用setForeground设置
Panel上通过paint方法实现,Graphics的drawString来显示,颜色用Graphics的setColor来设置