// Only pack if we are not visible yet, or we are not maximised.
// Packing a window that is maximised will cause it to srink to a normal windowed state.
// Craig Mitchell: 30/01/2007.
// -------------------------------------------------------------------------------------
if (c.isVisible() == false || c.getExtendedState() != Frame.MAXIMIZED_BOTH) {
c.pack();
}
}
else if (container instanceof JDialog) {
JDialog c = (JDialog)container;
c.pack();