public static void supportFind(final JTextComponent tp) {
		
		final JTextField tfFind = tf("", 30, null);
		final boolean[] regex = {false};
		Component cbRegex = checkboxInline("Regular Expression", regex[0], Fs.update(regex));
		
		final Matcher[] matcher = new Matcher[] {null};
		final P3<Integer, Boolean, Boolean> findAndMark3 = findAndMark(getTextF(tfFind), tp, matcher);
		final P2<Integer, Boolean> findAndMark = new P2<Integer, Boolean>() {public void e(Integer a, Boolean b) {
			findAndMark3.e(a, b, regex[0]);
		}};

		// Auto find forward
		onKeyUp(tfFind, new P0() {public void e() {
			findAndMark.e(tp.getSelectionStart(), true);
		}});

		final P0 findForward = new P0(){public void e() {
			findAndMark.e(tp.getSelectionEnd(), true);
		}};
		P0 findBackward = new P0() {public void e() {
			findAndMark.e(tp.getSelectionStart() - 1, false);
		}};

		JButton btnFind = btn("Find", 'F', findForward);
		onKeyDown(tp, "F3", findForward);
		onKeyDown(tp, "shift F3", findBackward);
		JButton btnFindBack = btn("Find Backward", findBackward);
		
		final Window frame = null;
		final JDialog dialog = dialog("Find/Replace", frame, hideFF);
		onKeyDown(tp, "control F", new P0(){public void e() {
			String selectedText = tp.getSelectedText();
			if (StringUtil.isNotEmpty(selectedText)) {
				tfFind.setText(selectedText);
			}
			tfFind.requestFocus();
			tfFind.selectAll();
			show(dialog);
		}});
		

		final JTextField tfReplace = tf("", 30);
		dialog.getRootPane().setDefaultButton(btnFind);
		
		
		JPanel panel1 = new JPanel();
		RowAdder rowAdder = rowAdder(panel1);
		rowAdder.row("Find", tfFind);
		rowAdder.row("Replace", tfReplace);
		rowAdder.row("", cbRegex);
		
		dialog.add(panel1, BorderLayout.CENTER);
		dialog.add(panel_vertical(
				btnFind, 
				btnFindBack,
				btn("Replace", 'R', new P0() {public void e() {
					if (regex[0]) {
						if (matcher[0] != null) {
							String replace = matcher[0].pattern().matcher(matcher[0].group()).replaceAll(tfReplace.getText());
							tp.replaceSelection(replace);
							findForward.e();
						}
					} else {
						tp.replaceSelection(tfReplace.getText());
						findForward.e();
					}
				}})), 
				BorderLayout.EAST);
	}