void (JComponent panel, boolean horizontalPanelOrientation) { JBDimension dimension; if (horizontalPanelOrientation) { dimension = new JBDimension(NOT_LIMITED_SIZE, PANEL_STANDARD_SIZE_HEIGHT); } else { dimension = new JBDimension(PANEL_STANDARD_SIZE_WIDTH, NOT_LIMITED_SIZE); } panel.setMinimumSize(new JBDimension(0, 0)); panel.setPreferredSize(dimension); panel.setMaximumSize(dimension); }