// paint: graphics/component width/component height // called in AWT thread static JComponent dynamicallyPaintedComponent(VF3 paint) { ret swing(func -> JComponent { new JComponent { public void paint(Graphics g) { callF(paint, (Graphics2D) g, getWidth(), getHeight()); } }}); }