Look-and-feel of an applet window changes on subsequent displays

丶灬走出姿态 提交于 2019-12-08 04:09:12

问题


I have an applet that displays a dialog box on click of a button. When the dialog box is first displayed, it is shown using the native look-and-feel of the OS. When the dialog box is displayed a second time (same page, browser, OS, etc.), it is shown using what I think is the Swing look-and-feel. To my knowledege, I do not explicity set the look-and-feel of my applet. Should I be doing so to avoid this inconsistent behavior?


回答1:


Please elaborate what you mean by "display". A different screen on the same computer? A different computer? Is the same version of Java installed? Is the exact same version of the OS installed?

The user can influence the L&F with environment variables. These docs may help.

Also, for the native Windows XP L&F, you need a special DLL.



来源:https://stackoverflow.com/questions/1606011/look-and-feel-of-an-applet-window-changes-on-subsequent-displays

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!