如何在Netbeans中使用jetbrains布局启动swing应用程序 [英] How to launch swing app with jetbrains layouts in Netbeans

查看:699
本文介绍了如何在Netbeans中使用jetbrains布局启动swing应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IDEA中使用一些摆动布局创建了应用程序。我想在Netbeans中启动它以便进行分析。但是我得到:

I've created app in IDEA with some swing layouts. I want to launch it in Netbeans in order to profile. But I get:

Exception in thread "main" java.awt.IllegalComponentStateException: contentPane cannot be set to null.
    at javax.swing.JRootPane.setContentPane(JRootPane.java:603)
    at javax.swing.JDialog.setContentPane(JDialog.java:991)
    at TransTest.<init>(TransTest.java:44)
    at TransTest.main(TransTest.java:284)

我应该提供哪些文件以便运行它?

What files etc I should supply in order to run it?

推荐答案

可以在用户界面设计师网页


独特的字节码检测技术允许您摆脱Java源代码中复杂的Swing代码。 IntelliJ IDEA的GUI编译器透明地生成创建和布局表单组件所需的所有必要代码。 GUI编译器已集成到IntelliJ IDEA的make功能中,也可作为与IntelliJ IDEA分发一起提供的单独Ant任务。还有一个生成Java源代码的选项,而不是使用字节码检测方法。

Unique Byte-code instrumentation techniques allow you to get rid of complicated Swing code in your Java sources. IntelliJ IDEA's GUI-compiler transparently generates all necessary code needed to create and lay out form components. The GUI-compiler has been integrated into IntelliJ IDEA's make functionality, and is also available as a separate Ant task delivered together with the IntelliJ IDEA distribution. There is also an option to generate Java source code instead of using the byte-code instrumentation approach.

所以生成Java源代码并在NetBeans中使用它,或者只是手动编写布局而不是使用UI设计师。

So generate Java source code and use that in NetBeans, or simply hand-code your layouts rather then using a UI designer.

这篇关于如何在Netbeans中使用jetbrains布局启动swing应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆