I faced the following java error “exception in thread awt-eventqueue-0” java awt awterror boxlayout can t be shared” Exception in thread “AWT-EventQueue-0” java.awt.AWTError: BoxLayout can’t be shared at javax.swing.BoxLayout.checkContainer(Unknown Source) at javax.swing.BoxLayout.invalidateLayout(Unknown Source) at javax.swing.BoxLayout.addLayoutComponent(Unknown Source) at java.awt.Container.addImpl(Unknown Source)Read more
I faced the following java error “exception in thread awt-eventqueue-0” java awt awterror boxlayout can t be shared”
- Exception in thread “AWT-EventQueue-0” java.awt.AWTError: BoxLayout can’t be shared
at javax.swing.BoxLayout.checkContainer(Unknown Source)
at javax.swing.BoxLayout.invalidateLayout(Unknown Source)
at javax.swing.BoxLayout.addLayoutComponent(Unknown Source)
at java.awt.Container.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at javax.swing.JFrame.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at GUI.run(GUI.java:64)
I used import of box layout at program.
import javax.swing.BoxLayout;