我只是在Intellij中创建名为TestUI的GUI表单。然后由IDE创建TestUI.form和TestUI.java,如下所示。
TestUI.java
public class TestUI {
}
TestUI.form
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="TestUI">
<grid id="27dc6" row-count="1" column-count="1" layout-manager="GridLayoutManager">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</form>
奇怪的是java文件为空,表单文件无法作为图形界面打开。而且xmlns="http://www.intellij.com/uidesigner/form/"
被IDE标记为红色。你能帮助我吗 ?如何打开表单文件作为图形界面?