Rectangle rect = DockbarLayoutManager.getManager().getLayoutArea(manager);
int rightX = rect.x + rect.width;
int bottomY = rect.y + rect.height;
Dockbar leftBar = manager.getLeftBar();
Dockbar rightBar = manager.getRightBar();
Dockbar bottomBar = manager.getBottomBar();
Dimension leftPref = leftBar.getPreferredSize();
Dimension rightPref = rightBar.getPreferredSize();
Dimension bottomPref = bottomBar.getPreferredSize();
// set the dockbar bounds
leftBar.setBounds(rect.x, rect.y, leftPref.width, rect.height-bottomPref.height);
rightBar.setBounds(rightX-rightPref.width, rect.y, rightPref.width, rect.height-bottomPref.height);
// use complete window width for proper statusbar support
bottomBar.setBounds(rect.x, bottomY-bottomPref.height, rect.width, bottomPref.height);
layoutViewpane();
}