&& !maximized
&& (frame.isPreferredWidthSet()
|| frame.isPreferredHeightSet()));
// Size/position menu bar
MenuBar menuBar = frame.getMenuBar();
if (menuBar != null
&& menuBar.isVisible()) {
menuBar.setLocation(clientX, clientY);
menuBar.setSize(clientWidth, menuBar.getPreferredHeight());
clientY += menuBar.getHeight();
}
// Size/position content
Component content = frame.getContent();
if (content != null) {
int contentX = clientX + padding.left;
int contentY = clientY + padding.top;
int contentWidth = Math.max(clientWidth - (padding.left + padding.right), 0);
int contentHeight = Math.max(clientHeight - (clientY + padding.top + padding.bottom) + 1, 0);
content.setLocation(contentX, contentY);
content.setSize(contentWidth, contentHeight);
}
} else {
titleBarTablePane.setVisible(false);
resizeHandle.setVisible(false);
// Size/position menu bar
int clientY = 0;
MenuBar menuBar = frame.getMenuBar();
if (menuBar != null
&& menuBar.isVisible()) {
menuBar.setLocation(0, clientY);
menuBar.setSize(width, menuBar.getPreferredHeight());
clientY += menuBar.getHeight();
}
Component content = frame.getContent();
if (content != null) {
content.setLocation(padding.left, clientY + padding.top);