简体   繁体   English

如何创建这样的Java swing UI?

[英]how do I create a Java swing UI like this?

Below UI is something I'd like to aim for. UI下面是我想要的目标。 But I have no idea, how they have the "skin" of the app. 但是我不知道他们如何拥有应用程序的外观。 On my end, the Java application looks like it was made in 1990s. 在我看来,Java应用程序看起来像是1990年代制造的。 I want to change a look to a more modern style. 我想将外观更改为更现代的风格。

What components are they using possibly here? 他们可能在这里使用什么组件? JSplitpane for one. JSplitpane之一。 but I'm not sure how they created that "Dokument/Vorschau" tabs. 但我不确定他们是如何创建“ Dokument / Vorschau”标签的。

在此处输入图片说明

First using a look and feel like Nimbus , can easily change the look of your application to a have a more modern feel. 首先使用类似于Nimbus的外观,可以轻松地将应用程序的外观更改为更现代的感觉。

Second, you will need to customize the font, color, borders, node icons, etc. of each component type to achieve a non-standard look. 其次,您将需要自定义每种组件类型的字体,颜色,边框,节点图标等,以实现非标准外观。 Some of these can be changed with updates to the UIDefaults of the look and feel but many will be made by calling methods on the specific instance of the component you are dealing with. 其中一些可以通过更新外观的UIDefaults来更改,但是许多可以通过在要处理的组件的特定实例上调用方法来进行。

尝试使用javax.swing.JTabbedPane。

If you really want to change the complete look-and-feel of your application from scratch, you should take a look at Synth L'n'F . 如果您真的想从头开始更改应用程序的整体外观,则应该看看Synth L'n'F You can define style and appearance of components and bind them to components which match certain criteria. 您可以定义组件的样式和外观,并将其绑定到符合特定条件的组件。

(My opinion on that matter: heavily themed apps usually look and feel out-of-the-place and only make it harder to use the app, so I'd actually try to avoid themeing) (对此,我的看法是:主题繁多的应用通常看起来和感觉不适当,只会使应用变得更难使用,因此我实际上会尝试避免主题化)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM