Hi all,
I had created a user interface in Netbeans before I came to know about JME. Now, I am trying to modify the sample given as JMESwingTest.java by incorporating the UI I had made. After modifications, I got the following errors while running the file.
****************************************************************
INFO: LWJGL Display System created.
9 Jan, 2008 9:29:20 PM class jmetest.TestChooser start(args)
SEVERE: Exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAcce
ssorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jmetest.TestChooser.start(Unknown Source)
at jmetest.TestChooser.main(Unknown Source)
Caused by: java.lang.IllegalStateException: javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.BevelBorder@162dbb6,flags=9,maximumSize=,minimumSize=,preferredSize=] is not attached to a vertical group
at javax.swing.GroupLayout.checkComponents(GroupLayout.java:1069)
at javax.swing.GroupLayout.prepare(GroupLayout.java:1019)
at javax.swing.GroupLayout.preferredLayoutSize(GroupLayout.java:857)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.JRootPane$RootLayout.preferredLayoutSize(JRootPane.java:903)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:702)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at java.awt.Window.pack(Window.java:665)
at jmetest.util.JMESwingTest$NewJFrame.initComponents(Unknown Source)
at jmetest.util.JMESwingTest$NewJFrame.<init>(Unknown Source)
at jmetest.util.JMESwingTest.<init>(Unknown Source)
at jmetest.util.JMESwingTest.main(Unknown Source)
… 6 more
***************************************************************************8888
Please help in finding out where am I going wrong.
Thank you
Pranav
looks like a layout issue with your code
Caused by: java.lang.IllegalStateException: javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.BevelBorder@162dbb6,flags=9,maximumSize=,minimumSize=,preferredSize=] is not attached to a vertical group
Yes I can see that, could you please help me how could I rectify this.
Thank you
Pranav
Put your JPanel in a vertical group. If that doesn't make sense, learn how to work with GroupLayout. Googling "is not attached to a vertical group" might give you a starting point.
Or don't use GroupLayout in your UI, you can change a Container's layout easily in Matisse (NetBeans' gui builder)