IntelliJ IDEA GUI构建器 - 未生成Java代码 [英] IntelliJ IDEA GUI builder – no Java code generated

查看:1191
本文介绍了IntelliJ IDEA GUI构建器 - 未生成Java代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IntelliJ IDEA GUI设计器中设计了我的GUI表单,并在项目设置→GUI设计器生成源代码而不是 .class 文件,但我的 .java 带代码的文件如下所示:

I have designed my GUI form in the IntelliJ IDEA GUI designer, and selected the radio button in Project Settings → GUI Designer to generate source code instead of .class files, but my .java file with code looks like this:

public class PovRayEmptyProjectWizardPanelVisual {
    private JTextField textField1;
    private JTextField textField2;
    private JTextField textField3;
    private JButton button1;
}

就是这样 - 没有生成创建GUI的代码。如何手动触发此类代码生成,以便我可以使用Maven编译生成的 .java 文件?

That’s it – no code creating the GUI was generated. How do I manually trigger such code generation, so that I can compile the resulting .java file with Maven?

推荐答案

源代码生成于 Build | 生成。如果您在外部构建,可以从Ant(IDEA提供的 javac2 任务)或 Maven

Source code is generated on Build | Make. If you build externally, IDEA GUI forms can be compiled from Ant (javac2 task provided with IDEA) or Maven.

这篇关于IntelliJ IDEA GUI构建器 - 未生成Java代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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