标签:ogr lazy 方法 cut 无法运行 cannot 解决方法 page image
使用IDEA创建Swing布局文件和绑定Class后无法运行,报错信息如下:
Exception in thread "main" java.awt.IllegalComponentStateException: contentPane cannot be set to null.
at java.desktop/javax.swing.JRootPane.setContentPane(JRootPane.java:594)
at java.desktop/javax.swing.JFrame.setContentPane(JFrame.java:679)
at ComiNX.main(ComiNX.java:15)
Execution failed for task ‘:ComiNX.main()‘.
> Process ‘command ‘C:/Program Files/Java/jdk-14.0.1/bin/java.exe‘‘ finished with non-zero exit value 1
在帖子Intellij (Swing) GUI not compiling because of Gradle中有人指出这是因为使用Gradle编译的原因。因此可以得出解决方法:
如下图所示,将图示位置修改为IDEA即可解决该问题。
如果你同样遇到该问题并通过此贴解决了问题,你可以留下你的评论来提示后来人该方法是可行的。
Exception in thread main java.awt.IllegalComponentStateException contentPane cannot be set to null.
标签:ogr lazy 方法 cut 无法运行 cannot 解决方法 page image
原文地址:https://www.cnblogs.com/focksor/p/13170740.html