public Dimension getMaximumSize() { // HACK - Not sure why menu takes up 1/2 of screen...? return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height); } };
public Dimension getMaximumSize() { // HACK - Not sure why menu takes up 1/2 of screen...? return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height); } };
public Dimension getMaximumSize() { // HACK - Not sure why menu takes up 1/2 of screen...? return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height); } };
/** * Returns the maximum amount of space the layout can use. * * @param target the Container for which this layout manager * is being used * @return a Dimension object containing the layout's maximum size */ public Dimension maximumLayoutSize(Container target) { Dimension rd, mbd; Insets i = rootPane.getInsets(); Container contentPane = rootPane.getContentPane(); JMenuBar menuBar = rootPane.getJMenuBar(); if (menuBar != null && menuBar.isVisible()) { mbd = menuBar.getMaximumSize(); } else { mbd = new Dimension(0, 0); } if (contentPane != null && contentPane.isVisible()) { rd = contentPane.getMaximumSize(); } else { // This is silly, but should stop an overflow error rd = new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE - i.top - i.bottom - mbd.height - 1); } return new Dimension(Math.min(rd.width, mbd.width) + i.left + i.right, rd.height + mbd.height + i.top + i.bottom); }
int mbHeight = Integer.MAX_VALUE; if (root.getJMenuBar() != null) { Dimension mbd = root.getJMenuBar().getMaximumSize(); if (mbd != null) { mbWidth = mbd.width;
mbd = root.getJMenuBar().getMaximumSize(); if (mbd != null) { mbWidth = mbd.width;
mbd = root.getJMenuBar().getMaximumSize(); if (mbd != null) { mbWidth = mbd.width;
mbd = root.getMenuBar().getMaximumSize(); if (mbd != null)
mbd = root.getJMenuBar().getMaximumSize(); if (mbd != null) { mbWidth = mbd.width;
mbd = root.getJMenuBar().getMaximumSize(); if (mbd != null) { mbWidth = mbd.width;