Today, I've been dabbling in using jython to create a GUI using swing. I'm no expert programmer, so I decided to have a go at using the Netbeans IDE to design the interface and then adapt the output for use in jython as I have more experience in python than Java. After working through the code I managed to rid all the syntax errors but am still left with an error that reads:
Traceback (most recent call last):
File "<path of file>", line 362, in <module>
run = InitGUI()
File "<path of file>", line 358, in __init__
frame.show()
at javax.swing.GroupLayout.checkParent(Unknown Source)
at javax.swing.GroupLayout.invalidateLayout(Unknown Source)
at java.awt.Container.invalidate(Unknown Source)
at java.awt.Component.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.show(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: GroupLayout can only be used with one Container at a time
Now, I have no idea what has caused this, or how/where to look to go about solving it.
Full source code is here.
I would really appreciate it if anyone could take a look,
Thanks