public static void onResize(final JFrame frame, final P1<Dimension> p1) {
		frame.addComponentListener(new ComponentAdapter(){
			public void componentResized(ComponentEvent e) {
				p1.e(frame.getSize());
			}
		});
	}