public void componentResized(ComponentEvent event) {
				int w = getWidth();
				int h = getHeight();
				Insets i = getDockingPanelInsets();

				if (event.getComponent() == DockingDesktop.this) {
					// hide the expanded panel if necessary
					expandPanel.collapse();
					// resize the panel
					contentPane.setBounds(0, 0, w, h);
					revalidate();
				} else if (event.getComponent() == dockingPanel) {
					if (maximizedComponent != null) {
						if (DockingPreferences.isLightWeightUsageEnabled()) {
							maximizedComponent.setBounds(i.left, i.top, w
									- i.left - i.right, h - i.top - i.bottom);
						} else {
							if (DockingPreferences
									.isSingleHeavyWeightComponent()) {
								if (DockingUtilities
										.isHeavyWeightComponent(maximizedComponent)) {
									maximizedComponent.setBounds(i.left, i.top,
											w - i.left - i.right, h - i.top
													- i.bottom);
								} else {
									maximizedComponent.getParent().setBounds(
											i.left, i.top,
											w - i.left - i.right,
											h - i.top - i.bottom);
								}
							} else {
								maximizedComponent.getParent().setBounds(
										i.left, i.top, w - i.left - i.right,
										h - i.top - i.bottom);
							}
						}
					}
					mouseMotionGrabber.setBounds(i.left, i.top, w - i.left
							- i.right, h - i.top - i.bottom);
					dockingPanel.revalidate();
				}
			}