Search code examples
javaswingjprogressbar

Changing JProgressBar


After noticing this link: http://www.newscientist.com/blogs/nstv/2010/12/best-videos-of-2010-progress-bar-illusion.html I wanted to make my jprogressbar look like that. How would I go about doing that? Is there a library that already does that for me?


Solution

  • Short answer - create a custom ProgressBarUI (overload BasicProgressBar for easiest use) and override the paintDeterminate method.

    Longer answer - I'm in middle of experimenting exactly how you'd do this, will create a blog post with source code and link back to it here.

    Edit: I have it working now. Here's a sample video

    Code is available on github

    Blog post to follow.