BoxLayout - can't be shared run time error
807606Apr 16 2007 — edited Apr 16 2007Hi!
I get this error:
Exception in thread "AWT-EventQueue-0" java.awt.AWTError: BoxLayout can't be shared.
I have a main panel, with all the UI components working fine. When I press a button I display a custom dialog. I try to set a JPanel as the dialog's content pane. Then I try to set up the BoxLayout as the layout manager for the JDialog.
But I get that awful error.
Can you please tell me why?
I enclose some code too:
JDialog sortDialog = new JDialog(frame, "Se sorteaza");
BoxLayout layout = new BoxLayout(sortDialog, BoxLayout.Y_AXIS);
sortDialog.setContentPane(new JPanel(layout));
sortDialog.pack();
sortDialog.setVisible(true);
Message was edited by:
nopceafrancisc