改变applet的灰色背景色
改变applet的灰色背景色
如果你的applet类继承了javax.swing.JApplet,则需要这样设置 在init()方法中添加 getContentPane().setBackground(Color.white); 这里是设置为白色了。
如果你的applet类继承了javax.applet.Applet,则需要这样设置 在init()方法中添加 setBackground(Color.white); 这里是设置为白色了。
如果是设置无效,参照:http://www.hotscripts.com/forums/everything-java/36553-jdk-1-6-0-applet-background-color-issue.html
近期评论