This is a General pourpous java swing 2DGraphics component created as a classic linear progress bar.
This java swing component can integrate with a classic UI design.
To use this component on your project, download or coppy LinearPogrssBar.java into your src (or package) folder. then make a object of LinearProgressBar class on your GUI design class
LinearPogrssBar linearPogrssBar = new LinearPogrssBar();
now generate your percentage value from wherever in your code. finally call Update and repaint methods from linearPogrssBar
// where i is the percentage value that you generated
linearPogrssBar.Update(i);
linearPogrssBar.repaint();