IntelliJ IDEA Can't create GUI Form

爷,独闯天下 提交于 2020-02-03 04:32:22

问题


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.

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


回答1:


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




回答2:


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:

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

  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:

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

  4. Create the new form:

    Right click on the package -> new GUI Form

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




回答3:


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




回答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.




回答5:


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




回答6:


In the latest version it's like this:




回答7:


I had this problem and the only change I needed to do was to use one word in the input fields for the New GUI Form dialog. When I tried clicking the OK button no error message or warnings were displayed, just nothing happened. Probably a pretty obvious thing, but worth sharing in case anyone else runs into it.



来源:https://stackoverflow.com/questions/9118589/intellij-idea-cant-create-gui-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!