Questions tagged [jprogressbar]

JProgressBar is a Java Swing component that visually displays the progress of some task.

JProgressBar is a Java Swing component that visually displays the progress of some task. As the task progresses towards completion, the progress bar displays the task's percentage of completion. This percentage is typically represented visually by a rectangle which starts out empty and gradually becomes filled in as the task progresses. In addition, the progress bar can display a textual representation of this percentage.

For details and examples see How to Use Progress Bars tutorial.

492 questions
1
vote
0 answers

indeterminate JProgressBar while a background task executes

I want to display a JProgressBar in the foreground and run a task in background, but my program does not start the progress bar simply. import java.awt.EventQueue; import java.util.concurrent.TimeUnit; import javax.swing.JFrame; import…
sam
  • 59
  • 1
  • 1
  • 7
1
vote
1 answer

Joining JProgressBar and JTextArea (batch running console) in Eclipse

Hello I am facing few problem in combining JtextArea with JProgressBar . JtextArea is showing the console of batch running script. here is my code:- private void initialize() { frmPdfPublisher = new JFrame(); …
Rohit Ghosh
  • 53
  • 11
1
vote
2 answers

Java Swing: Having Multiple Colors in One JProgressBar

My boss has put me in charge of building a production dashboard to track the efficiency of the workers on a production line. He wants a progress bar to fill up in relation to the time and change colors if the worker is running on time or if they're…
BamSquid
  • 35
  • 1
  • 2
  • 6
1
vote
1 answer

Java using jProgressBar within loop

i build an Application and i have a button do a lot of things when i press it the application is freeze it for some second. So i just want put a jProgressBar here is my code : String s=""; long l=System.currentTimeMillis(); for(int…
hoger qassim
  • 37
  • 1
  • 9
1
vote
2 answers

Swing JProgressBar doesn't repaint as I'd expect it to

Hey all, I have a pretty simple problem someone should be able to help me with. All I want is a small frame with a progress bar that updates, right now it's not updating: final JProgressBar bar = new…
zaczap
  • 1,386
  • 1
  • 14
  • 20
1
vote
1 answer

Components size not adjustable in JFrame

I'm trying to make a JFrame with a JProgressbar and a JButton inside, for the user to be see how far the process is and able to abort the process. The only issue I seem to encounter, the progressbar and button components to always adjust to the…
Zwetje
  • 13
  • 2
1
vote
2 answers

Unexplainable behaviour of setProgress in SwingWorker

I did a quick and dirty implementation of SwingWorker to test the publish() and setProgress() methods. When I set the parameter for the setProgress() method like stated in the complete sourcecode below, everything works as expected. However if I set…
motaa
  • 327
  • 2
  • 11
1
vote
2 answers

JProgress Bar Not Updating Within SwingWorker

I apologize for adding to the many JProgressBar update questions, but this has really been driving me crazy. I have a JProgressBar being updated via a SwingWorker yet I'm still having the typical problem of the bar being updated after completion.…
1
vote
0 answers

How to calculate progress of Jprogressbar?

Somehow the Jprogressbar is moving, but not in time with the code in the background method thru Swingworker. The task is done in another Thread, it works. I tried to use a while loop. println is not printing at the end. ? Thanks // this is part of…
loadP
  • 404
  • 1
  • 4
  • 15
1
vote
1 answer

JProgressBar query

Is it possible to start JProgressBar from inbetween.I know this is wierd but I need to show the update between 20-80% and the progress bar should be invisible between 0-20% and 80-100% and the number 20 and 80 are run time variables.
Harish
  • 3,343
  • 15
  • 54
  • 75
1
vote
1 answer

JTree Progress bar blanks out on select

I am having an issue with JTree where the item blanks out on initial select and does not reflect the progress bar until deselected. Ref .gif: Code: import project3.game.Creature; import project3.game.Job; import javax.swing.*; import…
1
vote
1 answer

How to change the color of the default JProgressBar?

I am using NetBeans IDE 8.0.2 and I am trying to change the color of the JProgressBar from the default orange as shown below: I have tried changing the foreground and background in the properties but the result does nothing except change the color…
Osiris93
  • 296
  • 2
  • 18
1
vote
2 answers

JProgressbar not showing (without threads)

i have a program that takes some time creating pdf files i would like to show progress to user when i finish making a pdf file i try to call the progressbar to update its status: ProgressDialog progress = new ProgressDialog(instance,…
Berty
  • 1,081
  • 1
  • 18
  • 49
1
vote
0 answers

Java progress bar not progressing, though the file gets downloaded?

I have visited this and and several other pages like this on this forum and went through Swing on Oracle docs. All of their code doesn't work for my ProgressBar, even if I emulate all their codes line by line and with a few adjustment in my code. I…
asad
  • 318
  • 1
  • 16
1
vote
0 answers

Activate Progress Bar outside the main using data claculating in the background

i'm trying to activate progress bar that showing the advance of the "for loop" i have while i reading my files and writes them to excel file. the problam is that the bar don't update to the user until the end of the for loop in each way i tried.…
Udi
  • 598
  • 8
  • 19