UI Apps suddenly not working

I have three UI applications that are now suddenly no longer working within IntelliJ.  I am getting the following stack trace:


Exception in thread "main" java.awt.IllegalComponentStateException: contentPane cannot be set to null.
at javax.swing.JRootPane.setContentPane(JRootPane.java:602)
at javax.swing.JDialog.setContentPane(JDialog.java:997)
at oracle.applications.rolemining.Test.<init>(Test.java:14)
at oracle.applications.rolemining.Test.main(Test.java:68)


I recently upgraded from 6.x on Windows to 8.1 on the Mac.   To create the most basic test, I created a new Dialog GUI with a main and all the default elements on it.  I compiled and then ran it and it also gives me the above stack trace.

I have the UI generation setting to Binary class files, Automatically copy form runtime classes..., etc.

This issue that this was just working and suddenly it isnt and I pretty certain I didnt change anything.

Any insight or help would be very appreciated.  I have been using IntelliJ since 3.x and love the product - this is the first time I have ever experience anything like this.

Bryan


4 comments
Comment actions Permalink

Just done the same and it's Ok for me.

Does it also fail, if GUI code is generated into Java source file, not binary? If it does, compile and check generated code: is contentPane variable really initialized in $$$setupUI$$$ method or anywhere else before using as setContentPane() argument?

Alexander.

0
Comment actions Permalink

Hey Alexander,

I switched to source code generation and it was working.  Unfortunately shortly after, the code folding got a little screwy and somehow I ended pasting into the generated code block.  After undoing the mistake the code block no longer seems bound to the form.  I make changes on the form, like refactor the name of the button but it doesnt do the refactor in the code block.  As a matter of fact, it seemed to make the old button final and local to the block.  I tried to do 'Synchronize X.form' but that doesnt do anything.  I tried removing the block by cutting it and trying to coerse IntelliJ into regneratating the code block which also doesnt seem to work.

Not sure what to do other than start manually changing the code block.

Thanks,
Bryan

0
Comment actions Permalink

This just gets worse and worse.  IntelliJ is blowing chunks right now in very lame way.  Switching back to binary was a serious mistake.  Now nothing works.  I went through and manually removed all the embedded code and created a brand new project, removing all the classes and output directories.

It worse now than ever - wont even compile.  Get the following informative error:


Information:Note: Some input files use unchecked or unsafe operations.
Information:Note: Recompile with -Xlint:unchecked for details.
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Error: com.intellij.psi.impl.source.PsiReferenceListImpl

I have lost a full day already.



0
Comment actions Permalink

Well, think I figured it out - bad caches!  I invalidated the caches and things seem to be working.  *FINGERS CROSSED*

0

Please sign in to leave a comment.