void removeDevice(Device device) {
		DevicePanel dp = devicesMap.remove(device.getName());
		if (dp != null) {
			ClientConnectionManager.getInstance().removeClientChangedListener(
					dp);
			if ((panelList.size() > 1)
					&& (panelList.indexOf(dp) == (panelList.size() - 1))) {
				GridBagConstraints newLastConstraints = deviceListLayout
						.getConstraints(panelList.get(panelList.size() - 2));
				newLastConstraints.weighty = 1;
				deviceListLayout
						.setConstraints(panelList.get(panelList.size() - 2),
								newLastConstraints);
			} else if (panelList.size() == 1) {
				GridBagConstraints headerC = deviceListLayout
						.getConstraints(headerPanel);
				headerC.weighty = 1;
				deviceListLayout.setConstraints(headerPanel, headerC);
			}
			panelList.remove(dp);
			remove(dp);
			revalidate();
			repaint();
		}
	}