简体   繁体   English

损坏的 java swing 组件

[英]Corrupted java swing component

I'm working on a Java Swing project,我正在做一个 Java Swing 项目,

I have an issue with some component while running projects vs running the interface here's some screen shoot:我在运行项目与运行界面时遇到了一些组件的问题,这是一些屏幕截图:

This look when I run only the jFrame当我只运行 jFrame 时的这个样子

This is when I run A Frame that lead to this这是当我运行一个导致这个的框架

and this when i run the full project当我运行整个项目时

I want to know why this look difference and how to resolve it.我想知道为什么这看起来不同以及如何解决它。

I'm Using netbeans 12.2 with jdk 15.0.2 on a windows 64 bit machine我在 windows 64 位机器上使用 netbeans 12.2 和 jdk 15.0.2

Java Swing by default uses native GUI components. Java Swing 默认使用原生 GUI 组件。 The upside of this is that when done correctly, your Java application will have a Windows style on Windows and a Linux on Linux etc. To get a fixed style, you can set the Java Look And Feel to a LAF that is always available, such as the built-in METAL LAF. The upside of this is that when done correctly, your Java application will have a Windows style on Windows and a Linux on Linux etc. To get a fixed style, you can set the Java Look And Feel to a LAF that is always available, such作为内置的METAL LAF。 This page contains much more specifics on Java Look And Feels, how to set them and even how to create your own if you wish. 此页面包含有关 Java 外观和感觉的更多详细信息,如何设置它们,甚至如果您愿意,如何创建自己的。

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

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