小程序窗口的外观在后续显示中发生变化 [英] Look-and-feel of an applet window changes on subsequent displays

查看:26
本文介绍了小程序窗口的外观在后续显示中发生变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小程序,单击按钮时会显示一个对话框.对话框首次显示时,将使用操作系统的本机外观显示.当对话框第二次显示时(同一页面、浏览器、操作系统等),它使用我认为是 Swing 的外观显示.据我所知,我没有明确设置我的小程序的外观.我应该这样做以避免这种不一致的行为吗?

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?

推荐答案

请详细说明显示"的含义.同一台电脑的不同屏幕?不同的电脑?是否安装了相同版本的 Java?是否安装了完全相同版本的操作系统?

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?

用户可以使用环境变量影响 L&F.这些文档可能会有所帮助.

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

此外,对于本机 Windows XP L&F,您需要一个特殊的 DLL.

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

这篇关于小程序窗口的外观在后续显示中发生变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆