简体   繁体   English

NetBeans 外观和感觉与最终结果相同

[英]NetBeans look&feel same as resulting one

I am trying to find a java look&feel that can be used in NetBeans (I'm currently usign version 14) to have a "what you see is what you get" result我正在尝试找到可用于 NetBeans 的 java 外观和感觉(我目前正在使用第 14 版)以获得“所见即所得”的结果

As I said here: netbeans design missing bold , I was using the Metal l&f, both in NetBeans (by launching it with the "--laf javax.swing.plaf.metal.MetalLookAndFeel" parameter) and in the code正如我在这里所说: netbeans 设计缺少粗体,我在 NetBeans 中都使用了金属 l&f(通过使用“--laf javax.ZCE04E521DB2557AC5260EE070A3C0588Metal.”参数启动它)。

But lately it doesn't work as it used to: in NetBeans the varoius graphical objects (labels etc...) have a "normal" font, but when i run the project, they have a bold font, which makes them larger and ruins their positioning.但最近它不像以前那样工作了:在 NetBeans 中,各种图形对象(标签等......)有一个“正常”字体,但是当我运行项目时,它们有一个粗体字体,这使得它们更大并且破坏他们的定位。 Thus I can't create a good graphical interface anymore, because I have lost the "what you see is what you get" effect于是我再也无法创建一个好的图形界面,因为我失去了“所见即所得”的效果

I have also tried different l&f, for example Nimbus.我也尝试过不同的 l&f,例如 Nimbus。 With it, I can solve my problem: NetBeans correctly shows the graphical objects as expected.有了它,我可以解决我的问题:NetBeans 按预期正确显示图形对象。 But imho Nimbus has a big lack: non-editable obects (for example text fields) are showed identical as editable ones!但是恕我直言 Nimbus 有一个很大的缺陷:不可编辑的对象(例如文本字段)显示为与可编辑的对象相同! (the Metal l&f instead makes a good work at this) (Metal l&f 在这方面做得很好)

I'm searching for a l&f that can correctly be displayed by NetBeans, and that can differentiate between editable and non-editable objects.我正在寻找可以由 NetBeans 正确显示的 l&f,它可以区分可编辑和不可编辑的对象。 Can you point me out any?你能指出我吗?

Try com.sun.java.swing.plaf.windows.WindowsLookAndFeel.试试 com.sun.java.swing.plaf.Z0F4137ED1502B5045D6083AA2

You need not to put startup options in NetBeans, check look and feels Tools / Options / Apperance menu.您无需将启动选项放在 NetBeans 中,检查外观工具/选项/外观菜单。

Another workaround would be making all non-editable widgets to be disabled - setEnabled(false).另一种解决方法是禁用所有不可编辑的小部件 - setEnabled(false)。

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

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