@Override
	public final void display(final JPanel panel,
			@SuppressWarnings("hiding") final KeyEventHandler key) {
		final JPanel mainPanel = new JPanel();
		final JPanel buttonPanel = new JPanel();
		final JTextField textField = new JTextField();

		if (this.content.length() == 0) {
			textField.setText(getTooltip());
			textField.setForeground(Color.GRAY);
		} else {
			printValue(textField);
			textField.setForeground(Color.BLACK);
		}

		textField.addKeyListener(new KeyListener() {

			private final int[] cursor = new int[3];

			@Override
			public final void keyPressed(final KeyEvent e) {
				e.consume();
			}

			@Override
			public final void keyReleased(final KeyEvent e) {
				if (MaskedStringOption.this.initialValue) {
					if (e.getKeyChar() != KeyEvent.CHAR_UNDEFINED) {
						MaskedStringOption.this.content.clear();
						MaskedStringOption.this.initialValue = false;
						textField.setCaretPosition(0);
					}
				}
				this.cursor[1] = textField.getSelectionStart();
				this.cursor[2] = textField.getSelectionEnd();
				if (this.cursor[1] == this.cursor[2]) {
					this.cursor[0] = textField.getCaretPosition();
				}
				final int keyEvent = MaskedStringOption.this.content
						.handleEvent(e, this.cursor);
				if (keyEvent != 0) {
					key.handleKeyEvent(keyEvent);
				}
				printValue(textField);
				if (this.cursor[1] != this.cursor[2]) {
					textField.setSelectionStart(this.cursor[1]);
					textField.setSelectionEnd(this.cursor[2]);
				} else if (MaskedStringOption.this.content.isEmpty()) {
					textField.setCaretPosition(0);
				} else {
					textField.setCaretPosition(this.cursor[0]);
				}
				e.consume();
			}

			@Override
			public final void keyTyped(final KeyEvent e) {
				e.consume();
			}
		});

		final JCheckBox saveBox = new JCheckBox(), showBox = new JCheckBox();
		saveBox.setText("Save");
		saveBox.addChangeListener(new ChangeListener() {

			@Override
			public void stateChanged(final ChangeEvent e) {
				MaskedStringOption.this.save = !MaskedStringOption.this.save;
			}
		});

		showBox.setText("Show");
		showBox.addChangeListener(new ChangeListener() {

			@Override
			public void stateChanged(final ChangeEvent e) {
				MaskedStringOption.this.show = !MaskedStringOption.this.show;
				printValue(textField);
			}
		});

		buttonPanel.setLayout(new GridLayout(1, 2));
		buttonPanel.add(saveBox);
		buttonPanel.add(showBox);

		mainPanel.setLayout(new BorderLayout());
		mainPanel.add(textField);
		mainPanel.add(new JLabel(getDescription()), BorderLayout.SOUTH);
		mainPanel.setToolTipText(getTooltip());
		mainPanel.add(buttonPanel, BorderLayout.EAST);
		panel.add(mainPanel);

	}