繁体   English   中英

GUI源IntelliJ Idea

[英]GUI source IntelliJ Idea

IntelliJ Idea GUI设计器不提供生成的JForm的源代码。 我尝试使用文件>设置> GUI设计器> Java源代码,但没有效果。 我得到的是这样的,它看起来与预览不同。

private void $$$setupUI$$$() {
    panel1 = new JPanel();
    panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    tabbedPane1 = new JTabbedPane();
    panel1.add(tabbedPane1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    tabbedPane1.addTab("Log In", panel2);
    final JPanel panel3 = new JPanel();

还有错误警告“无法解析符号'intellij'”如何解决?

IDEA生成的源(许多注释也会输出)也不是要编辑的内容。

目前还不清楚你的问题中关于什么看起来不同的意思:你的意思是你认为应该如何看待预览的样子? 或者代码产生的结果gui看起来不同......如果是后者 - 请提供所有源代码以使我们能够更深入地了解。

警告是因为类(如GridLayoutManager)在运行时之前对IDE /编译器不可见。 但是,如果程序是从IDEA运行的 - 它应该执行得很好,因为forms_rt.jar(包含this和其他有用的类)将出现在类路径中。

有关更多详细信息,请参阅http://www.jetbrains.com/idea/webhelp/gui-designer.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM