Tutorial: Swing Synth PLAF Template - Part 10: Progress Bars
These are tougher - they come in determinate and indeterminate flavours. We're only going to support the indeterminate version for now, reusing components.
@Override
public void paintProgressBarBackground(SynthContext context, Graphics graphics, int x, int y, int w, int h) {
paintBorder(context, graphics, x, y, w, h);
paintVerticalGradient(context, graphics, x, y, (int)(w * ((JProgressBar) context.getComponent()).getPercentComplete()), h);
}