问题
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:
Make sure that the "UI designer" is enabled:
File -> Settings -> Plugins -> UI Designer (checked)
The parent (root) folder must be market as "source root"
Right click on the folder -> Mark Directory as -> Source root
Create a package from the "src" folder:
Right click on the "src" folder -> New -> Package
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