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