Java GUI在所有操作系统上都显示相同吗? [英] Do Java GUIs display the same on all operating systems?

查看:144
本文介绍了Java GUI在所有操作系统上都显示相同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Java编写的程序使用Swing的组件来构建其GUI,在所有操作系统上的显示是否完全相同?

Do programs written in Java that use components from Swing to build their GUI display exactly the same on all operating systems?

让我这样问这个问题:使用Java,是否有可能设计一个可以保证在所有平台上显示完全相同的GUI?

let me ask the question this way: using Java is it possible to design a GUI that is guaranteed to display exactly the same on all platforms?

推荐答案

不久之后,默认情况下外观会有所不同,因为swing使用系统外观&感觉,但您可以覆盖它(http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html),在这种情况下,应用程序在所有平台上的外观和外观都相同.感觉,或者您可以禁用某些外观&感觉像-Dswing.noxp = true

Saying shortly it will look differently by default, because swing uses system look & feel, but you can override it (http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html), in this case application will look the same on all platforms with the same look & feel, or you may disable some look & feel features like -Dswing.noxp=true

这篇关于Java GUI在所有操作系统上都显示相同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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