IntelliJ IDEA无法创建GUI表单

时间:2022-07-09 20:42:17

Supposedly creating a new GUI form should be a simple matter of right-clicking your project, package or src folder and go New > GUI Form. The problem is I don't have that option. I've created a Java project and it compiles and runs fine.

假设创建一个新的GUI表单应该是右键单击项目,包或src文件夹并转到New> GUI Form的简单问题。问题是我没有那个选择。我已经创建了一个Java项目,它编译并运行良好。

But the only options I get under New are Java Class, File, Package, HTML File, and JavaScript File.

但我在New下获得的唯一选项是Java类,文件,包,HTML文件和JavaScript文件。

5 个解决方案

#1


12  

Double check that you have UI Designer enabled in Settings | Plugins.

仔细检查您是否在“设置”|中启用了UI Designer插件。

#2


5  

You need the create a package, and after you can create GUI forms.

您需要创建一个包,然后才能创建GUI表单。

#3


4  

You need to create a package, and have open a class file within the package, and THEN you can create GUI forms. The options in the File -> New menu change depending on what kind of file you are currently editing.

您需要创建一个包,并在包中打开一个类文件,然后您可以创建GUI表单。 “文件” - >“新建”菜单中的选项会根据您当前正在编辑的文件类型而更改。

#4


4  

Really old question, but if I got here someone else may as well...

真的很老的问题,但如果我到这里别人也可能......

So, step by step:

所以,一步一步:

  1. Make sure that the "UI designer" is enabled:

    确保启用了“UI设计器”:

    File -> Settings -> Plugins -> UI Designer (checked)

    文件 - >设置 - >插件 - > UI设计器(已选中)

  2. The parent (root) folder must be market as "source root"

    父(根)文件夹必须作为“源根”进行市场营销

    Right click on the folder -> Mark Directory as -> Source root

    右键单击文件夹 - >标记目录为 - >源根目录

  3. Create a package from the "src" folder:

    从“src”文件夹创建一个包:

    Right click on the "src" folder -> New -> Package

    右键单击“src”文件夹 - >新建 - >包

  4. Create the new form:

    创建新表单:

    Right click on the package -> new GUI Form

    右键单击包 - >新GUI表单

PS. I'm not sure, but I reckon it's possible to skip the package step...

PS。我不确定,但我认为可以跳过包装步骤......

#5


2  

I know this is an old thread, but it still deserves a straight answer. I had to right click the package itself inside the project directories. You cannot use the "file > new" option. So once you create your package, right click the directory you want the files created in, go to new > GUI Form

我知道这是一个老线程,但它仍然值得直接回答。我必须在项目目录中右键单击包本身。您不能使用“file> new”选项。因此,一旦创建了包,右键单击要在其中创建文件的目录,转到新建> GUI表单

#1


12  

Double check that you have UI Designer enabled in Settings | Plugins.

仔细检查您是否在“设置”|中启用了UI Designer插件。

#2


5  

You need the create a package, and after you can create GUI forms.

您需要创建一个包,然后才能创建GUI表单。

#3


4  

You need to create a package, and have open a class file within the package, and THEN you can create GUI forms. The options in the File -> New menu change depending on what kind of file you are currently editing.

您需要创建一个包,并在包中打开一个类文件,然后您可以创建GUI表单。 “文件” - >“新建”菜单中的选项会根据您当前正在编辑的文件类型而更改。

#4


4  

Really old question, but if I got here someone else may as well...

真的很老的问题,但如果我到这里别人也可能......

So, step by step:

所以,一步一步:

  1. Make sure that the "UI designer" is enabled:

    确保启用了“UI设计器”:

    File -> Settings -> Plugins -> UI Designer (checked)

    文件 - >设置 - >插件 - > UI设计器(已选中)

  2. The parent (root) folder must be market as "source root"

    父(根)文件夹必须作为“源根”进行市场营销

    Right click on the folder -> Mark Directory as -> Source root

    右键单击文件夹 - >标记目录为 - >源根目录

  3. Create a package from the "src" folder:

    从“src”文件夹创建一个包:

    Right click on the "src" folder -> New -> Package

    右键单击“src”文件夹 - >新建 - >包

  4. Create the new form:

    创建新表单:

    Right click on the package -> new GUI Form

    右键单击包 - >新GUI表单

PS. I'm not sure, but I reckon it's possible to skip the package step...

PS。我不确定,但我认为可以跳过包装步骤......

#5


2  

I know this is an old thread, but it still deserves a straight answer. I had to right click the package itself inside the project directories. You cannot use the "file > new" option. So once you create your package, right click the directory you want the files created in, go to new > GUI Form

我知道这是一个老线程,但它仍然值得直接回答。我必须在项目目录中右键单击包本身。您不能使用“file> new”选项。因此,一旦创建了包,右键单击要在其中创建文件的目录,转到新建> GUI表单