java - Swing Designer 中的 Intellij FlatLAF 在编译后的应用程序中不起作用
问题描述
我正在尝试使用 swing 制作应用程序,我设法使用 Intellij 的 swing 设计器来构建 GUI,我制作了一个简单的 JPanel 并将其添加到框架中,但是在 Intellij 的设计器中,FlatLAF 被用作库,当我运行应用程序,我看到了默认的摆动组件,没有丢失任何组件,但是,FlatLAF 没有如下图所示工作,我知道我遗漏了一些东西,但我不知道它是什么,这里是带有代码的简单示例。
import javax.swing.*;
import java.awt.*;
public class WelcomeScreen extends JFrame {
private JPanel containerPanel;
private JTextArea programDescription;
private JCheckBox agreeCheckbox;
private JButton okButton;
private JLabel titleLabel;
public static ImageIcon peopleIcon;
WelcomeScreen(){
peopleIcon = new ImageIcon("People Icon.png");
this.setSize(500, 300);
this.setTitle("Account Manager - Welcome Screen");
this.setContentPane(containerPanel);
this.setMinimumSize(new Dimension(500, 300));
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setIconImage(peopleIcon.getImage());
this.setLocationRelativeTo(null);
//this.setResizable(false);
this.setVisible(true);
}
}
解决方案
推荐阅读
- c# - C# 更新 CSV 单元格
- javascript - 为什么这不更新我的状态,它应该?反应还原
- node.js - 仅当密钥存在 firebase 云功能时才更新
- c - C 案例编号+1:需要括号吗?
- jquery - 用户在新浏览器选项卡中输入 PDF 文件的 HTML 表单
- android - VideoPlayer 小部件不断给出 NullPointerException 调用空对象引用上的虚拟方法
- vba - 用于自动搜索的 Excel VBA 代码
- javascript - 用数字和星号在javascript中构建正方形
- arrays - 选择多个输入并以角度 5 存储到数组中
- php - 我无法在 PHP 邮件程序中编辑我的邮件文本