-5

i have a desktop GUI in swing , i want to show status of user storage used in the GUI using jProgressBar, Please suggest some attractive way to do.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user1608338
  • 1
  • 1
  • 1
  • 2

1 Answers1

3

I suggest you read this tutorial. I think it is the most attractive way to learn how to use JProgressBar.

To elaborate the answer a little:

JProgressBar progress = new JProgressBar(0, totalAvailableStorage);
progress.setValue(occupiedStorage);

Of course, you have to add the progress bar to its container and call progress.setValue() whenever needed.

Dan D.
  • 32,246
  • 5
  • 63
  • 79