public static void onChange(final JComponent tf, final F0<String> getTextF, P1<ActionListener> addAL, final F1<String, Boolean> p1) {
        final String[] lastVal = {getTextF.e()};
        if (addAL != null) {
			addAL.e(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					String text = getTextF.e();
					if (!ObjectUtil.equals(lastVal[0],text)) {
						p1.e(text);
						lastVal[0] = text;
					}
				}
			});
		}
		tf.addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent e) {
            }

            public void focusLost(FocusEvent e) {
                String text = getTextF.e();
                if (!ObjectUtil.equals(lastVal[0], text)) {
                    if (p1.e(text)) {
                        lastVal[0] = text;
                    } else {
                        SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                tf.requestFocus();
                                if (tf instanceof JTextField) {
									((JTextField)tf).selectAll();
								}
                            }
                        });
                    }
                }
            }
        });
    }