void addDevice(Device device) {

		// if device was in list of saved localhost devices, copy saved
		// preferences to this device
		for (Device d : model.getDevices()) {
			if (device.getSerialNumber().equals(d.getSerialNumber())) {
				device.copyProperties(d);
				break;
			}
		}

		// if user previously preferred not to delete local device from list,
		// avoids creating two entries for same device
		for (DevicePanel panel : panelList) {
			if (panel.getDevice().getSerialNumber()
					.equals(device.getSerialNumber())) {
				panel.setCaptureButton(true);
				return;
			}
		}

		DevicePanel devicePanel = new DevicePanel(model, device);
		ClientConnectionManager.getInstance().addClientChangedListener(
				devicePanel);
		GridBagConstraints devicePanelConstraints = new GridBagConstraints();
		devicePanelConstraints.gridx = 0;
		devicePanelConstraints.anchor = GridBagConstraints.PAGE_START;
		devicePanelConstraints.gridwidth = GridBagConstraints.REMAINDER;
		devicePanelConstraints.weightx = 1;
		devicePanelConstraints.fill = GridBagConstraints.HORIZONTAL;
		devicePanelConstraints.insets = new Insets(1, 1, 1, 1);

		if (panelList.size() > 0) {
			GridBagConstraints lastConstraints = deviceListLayout
					.getConstraints(panelList.get(panelList.size() - 1));
			lastConstraints.weighty = 0;
			deviceListLayout.setConstraints(
					panelList.get(panelList.size() - 1), lastConstraints);
		}
		devicePanelConstraints.weighty = 1;

		if (devicesMap.isEmpty()) {
			GridBagConstraints headerC = deviceListLayout
					.getConstraints(headerPanel);
			headerC.weighty = 0;
			deviceListLayout.setConstraints(headerPanel, headerC);
		}

		deviceListLayout
				.addLayoutComponent(devicePanel, devicePanelConstraints);

		add(devicePanel);
		devicesMap.put(device.getName(), devicePanel);
		panelList.add(devicePanel);
		revalidate();
		repaint();

	}