private void createNameLine(JPanel parent, GridBagLayout parentLayout,
			String label, String content) {
		JLabel infoLineLabel = new JLabel(label);
		infoLineLabel.setFont(infoLineLabel.getFont().deriveFont(Font.BOLD,
				infoLineLabel.getFont().getSize() + 2));
		GridBagConstraints constraints = new GridBagConstraints();
		constraints.gridx = 0;
		constraints.anchor = GridBagConstraints.LINE_START;
		constraints.insets = new Insets(2, 2, 2, 2);
		parentLayout.addLayoutComponent(infoLineLabel, constraints);
		parent.add(infoLineLabel);

		deviceName = new JTextField(content);
		deviceName.setFont(deviceName.getFont().deriveFont(
				(float) (deviceName.getFont().getSize() + 2)));
		deviceName.setBorder(null);
		deviceName.setEditable(false);
		deviceName.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent arg0) {
				// TODO Auto-generated method stub
			}

			@Override
			public void keyReleased(KeyEvent arg0) {
				// TODO Auto-generated method stub
			}

			@Override
			public void keyTyped(KeyEvent arg0) {
				if (deviceName.getText().length() >= MAX_DEVICE_NAME_CHARS) {
					try {
						arg0.consume();
						deviceName.setText(deviceName.getText(0,
								MAX_DEVICE_NAME_CHARS));
					} catch (BadLocationException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			}

		});

		constraints = new GridBagConstraints();
		constraints.gridx = 1;
		constraints.weightx = 1;
		constraints.insets = new Insets(2, 2, 2, 2);
		constraints.fill = GridBagConstraints.HORIZONTAL;

		if (!DeviceUtils.getInstance().changeNickname(device.getSerialNumber(),
				deviceName.getText(), model)) {
			DeviceUtils.getInstance().setDeviceNickname(
					device.getSerialNumber(), deviceName.getText());

		}

		parentLayout.addLayoutComponent(deviceName, constraints);
		parent.add(deviceName);

		editNameButton = new JButton(
				RemoteResourcesLocalization
						.getMessage(RemoteResourcesMessages.DeviceConfigurationDialog_EditNicknameButton));
		editNameButton.setBackground(null);
		editNameButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				if ("OK".equals(editNameButton.getText())) {
					deviceName.setEditable(false);
					editNameButton.setText(RemoteResourcesLocalization
							.getMessage(RemoteResourcesMessages.DeviceConfigurationDialog_EditNicknameButton));
				} else {
					deviceName.setEditable(true);
					editNameButton.setText("OK");
				}
			}
		});
		parent.add(editNameButton);

		constraints = new GridBagConstraints();
		constraints.anchor = GridBagConstraints.CENTER;
		constraints.fill = GridBagConstraints.BOTH;
		constraints.insets = new Insets(2, 2, 2, 2);
		constraints.gridx = 0;
		constraints.weightx = 1;
	}