0

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?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206

1 Answers1

4

As can be read on the UI designer webpage

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.

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

Robin
  • 36,233
  • 5
  • 47
  • 99