public static void onFocus(Component comp, final P0 p0) {
		if (comp instanceof Window) {

			((Window)comp).addWindowFocusListener(new WindowFocusListener() {
				public void windowLostFocus(WindowEvent e) {
				}
				
				@Override
				public void windowGainedFocus(WindowEvent e) {
					p0.e();
				}
			});
		} else {
			comp.addFocusListener(new FocusListener() {
				public void focusLost(FocusEvent e) {
				}
				public void focusGained(FocusEvent e) {
					p0.e();
				}
			});
		}
	}