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
3 answers

JProgressBar.stringPainted(true); is not working

This is a part of my java code, in this code I have written that when I click the button the value of JProgressBar should becomes 0 and stringPainted() returns true, but "string painted" is not visible when I click the button, please help. import…
1
vote
2 answers

How to update a progress bar from a method inside SwingWorker

I'm trying to update a progress bar and I can't do it. My code is something like this: public class MyWorker extends SwingWorker { public Void doInBackground(){ howMany=Integer.parseInt(textField.getText()); String…
Aitor
  • 53
  • 8
1
vote
0 answers

How to get realtime indexes processed while running checkdisk through commandline?

I got a method through which I can perform a checkdisk through Java. Since I am developing a PC optimizer, I need to show the user the indexes completed and the remaining ones.I can do it by running a checkdisk on command line using…
1
vote
3 answers

Change UI Lookup for ProgressBar Swing in Nimbus Theme

I want to change Color of Progressbar from Default-Orange to Green for Nimbus UI in NetBeans. I have added following lines for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if…
MalTec
  • 1,350
  • 2
  • 14
  • 33
1
vote
1 answer

NetBeans - Need assistance in updating jProgressBar from autogenerated code

(Ignore following sentence - I was being dumb). I have a feeling that I am calling the updates to my jProgressBar on the EDT (which I know is wrong). @Action public Task launchScenario() { return new…
Andrew
  • 42
  • 8
1
vote
1 answer

Swing ProgressBar is not always updated

I want to create a basic JDialog with a progress bar, and to update the bar when some operations are done. My code is: public class Main { public static void main(String[] args) { WikiReaderUI ui = new WikiReaderUI(); …
mawus
  • 1,178
  • 1
  • 11
  • 25
1
vote
2 answers

Java swing, SwingWorker, process bar won't update

My swingworker won't repaint my progress bar(I have 2 classes). This is my file downloader code. It puts percent of download in progress bar. public class Downloader extends SwingWorker { private String fileURL,…
1
vote
2 answers

JProgress Bar with Values

How can you display text inside a JProgressBar? i.e. "000/100" progPanel.setBorder(BorderFactory. createEmptyBorder(10,10,10,10)); timerBar = new JProgressBar(0,100); timerBar.setOrientation(JProgressBar.VERTICAL); timerBarLabel = new…
Malone
  • 155
  • 7
1
vote
1 answer

How to set JProgressBar text color independently for multiple JProgressBars without changing Look and Feel

Continuing from Setting the colors of a JProgressBar text I would like to be able to set the text colors of JProgressBars in my program dependent upon process state and without moving away from System look and feel. From one of the answers on…
chirality
  • 887
  • 7
  • 12
1
vote
1 answer

Showing batch file execution via swing progress bar

I am trying to execute a batch file and showing its progress through swing progress bar. But stdout.readLine() is returning null. I want to show the output but my InputStream is null. Any suggestion or any other way to do this? import…
Dipti
  • 91
  • 1
  • 5
1
vote
2 answers

How to use progress bar for an application to download from website?

I am using progress bar in my application where i am downloading content from a webaite and saving it into my database. I have put a progress bar to indicate if the download is completed but the problem is when everything is saved in my database…
stella
  • 47
  • 7
1
vote
1 answer

Can a JProgressBar be updated by simply incrementing setValue?

This is a homework assignment where I'm to read in a file and convert all the characters to upper or lower case depending on what the user selects. I've got all of that working, but I'm not sure if my progress bar is updating with each character…
1
vote
1 answer

Updating JList Components

I have a JProgressBar on a JPanel as a JList components.The JList components are supposed to update the JProgressBar in every two seconds.But the problem is, I don't know how to pass the value of progress into the JProgressBar. here is my code…
icook
  • 71
  • 8
1
vote
2 answers

JProgressBar background colour

I am trying to set the foreground colour of progress bars to green, and the background colour to yellow, I am doing the following JProgressBar pb = new JProgressBar(0, 100); pb.setBackground(Color.YELLOW); …
PDStat
  • 5,513
  • 10
  • 51
  • 86
1
vote
1 answer

Repaint progressbar when accesed from another class

I have a main class that has a JProgressBar. From the main class I create a instance of a class (named Opener) that has a method that reads text files that are usually big (>50000 lines of text). I pass a reference of the JProgressBar to the method…
geo
  • 517
  • 1
  • 9
  • 28