static JComponent gazelle_wavySpacer() { ret gazelle_wavySpacer(gazelle_color1(), gazelle_color2()); } static JComponent gazelle_wavySpacer(Color color1, Color color2) { ret jMinWidth(30, swing(-> new JComponent { public void paintComponent(Graphics g) { cast g to Graphics2D; int w = getWidth(), h = getHeight(); var points = graphAsPolygon(x -> 1-sineSigmoid(x), w, h); //printVars(+w, +h, points := takeFirst(5, points)); fillRect(g, 0, 0, w, h, color2); fillPrecisePolygon(g, points, color1); } })); }