如何获得操作系统的外观和感觉Java 7? [英] How to get the Operating System's Look & Feel in Java 7?

查看:130
本文介绍了如何获得操作系统的外观和感觉Java 7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Netbeans 7.1 IDE编写Java 7代码。从Java 1.7软件包中,他们在应用程序中使用了一个新主题。

I am coding Java 7 with the Netbeans 7.1 IDE. From the Java 1.7 package they are using a new theme in their applications.

我可以做些什么来使我的应用程序的主题完全符合操作系统中的主题(即如果我使用Ubuntu,我希望我的程序的外观和感觉是Ubuntu的那个?

What can I do to make my application's theme exactly the theme in operating system (i.e. if I am using Ubuntu, I want the look and feel of my program to be the that of Ubuntu's)?

推荐答案

我觉得这对SO来说更像一个问题,但总之你应该尝试类似的东西:

I feel that this is more a question for SO, but in short you should try something like :

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

这篇关于如何获得操作系统的外观和感觉Java 7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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