static JComponent jVerticalGreenBar(final LiveValue lv, fO... _) { final JComponent c = dynamicallyPaintedComponent(voidfunc(Graphics2D g, int w, int h) { float value = toFloat(lv!); float max = toFloat(optParam(_, 'max, (Number) 1f)); int height = iround(doubleRatio(value, max)*h); main.fillRect(g, 0, 0, w, h-height, Color.black); main.fillRect(g, 0, h-height, w, height, Color.green); }); bindLiveValueListenerToComponent(c, lv, r { c.repaint() }); ret c; }