title: How to create a loading bar in java
body: <p>I want to know that how to set a loop for a progress bar when i clicked a button. 
  I have tried it with a loop but it was a waste of time.I have attached the picture below that i exactly want.<a href="http://i.stack.imgur.com/pHcx3.jpg" rel="nofollow">There is button in the North of the form and there is Progress Bar in the south</a></p>