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
0
votes
2 answers

Calculate a value to update JProgressBar

I would like to display the proportion of an initial value in a JProgressBar. private void updateProgressBars() { //Update the progress bars to the new values. int p1 = 0, p2 = 1; //Player numbers double p1Progress =…
user3000918
0
votes
2 answers

How to show the CPU and disk usage in a JProgressBar?

I want to display the current cup usage and disk usage in two separate JProgressBars. And also it should update second by second. How to do it using java? I am quite new to java programming, so please give me some code example. Thanks in advance.
user3641302
  • 149
  • 1
  • 2
  • 13
0
votes
2 answers

showing progress of a task while a button is executing in java

I am executing several SQL queries in the function evoked by a button in java. I wish to show the status of the same, and I am using a jProgressBar for the same. But the problem is it will only update after the button has finished executing itself,…
0
votes
2 answers

JProgressBar line smaller than the bar

I don't know how to properly explain this, so here's a picture: You can see quite a bit of the background around the green line, especially at the start and below the line. How can I fix this?
0
votes
1 answer

Synthetica JProgressBar doesn't fill

Recently, I'm using Synthetica as default JLAF, but progress bar doesn't fill, I try the following customize sentences but, nothing changes: Synthetica.progressBar.x.animation.type with a different value of…
Vlad
  • 300
  • 1
  • 4
  • 13
0
votes
1 answer

Using SwingWorker to update the progress of a thread from another class

Value is updated by the end, but not during the process. I guess the reason is that the publish method locates outside the loop. As to invoke PropertyChangeListener, can it be achieved by defining the class without extends SwingWorker
Milo Lu
  • 3,176
  • 3
  • 35
  • 46
0
votes
1 answer

Can a JProgressBar show that a thread is alive?

I'm trying to learn about threads and JProgressBar. I have a class that implements Runnable. Let's say that the run() just sleeps for 20 seconds and displays "Hello World". Is it possible to create a JProgressBar that updates for as long as the…
MayNotBe
  • 2,110
  • 3
  • 32
  • 47
0
votes
1 answer

Swing Worker Usage in mixed threads

I have a GUI which consists of a toolbar with each button invoking different classes. The class I invoke consist of UI components which are displayed in the Internal frame of the main GUI. The Invoked class works as a separate thread and has to…
Joker
  • 81
  • 12
0
votes
1 answer

How to bind a JProgressBarr progress to a JButton preventing it from freezing?

that's the code i'm using, for the MAIN class: public class Main { public static void main(String[] args) throws Exception { MAINFRAME.GUI(); } } now that's about the mainframe class that is called from the main class: public class MAINFRAME…
ApprenticeGeek
  • 177
  • 1
  • 1
  • 7
0
votes
2 answers

How to implement JProgressbar for SimpleFileVisitor Class

I have simple file visitor class which scans all drives within PC to find specific extensions like .txt. I want to display the progress of this operation with a JProgressBar. With each scan, the number of total matched files may change. This…
user3498019
  • 95
  • 1
  • 2
  • 10
0
votes
1 answer

Java ProgressBar add value when something is downloaded

I want to add JProgressBar that will fill up during the download process in my program which will download files. Thr question is How do I make that the progress bar will add the correct amount in the setValue (eg: when it downloads the last file,…
3751_Creator
  • 656
  • 2
  • 8
  • 22
0
votes
1 answer

How show my application delay with JProgressBar?

I wrote a simple application and I want show delay of it with JProgressBar Plese help me ; I want show JProgressBar with Joptionpane , with a cancel button and it should be modal this is my source code : class CustomFrame extends JFrame { private…
Freeman
  • 9,464
  • 7
  • 35
  • 58
0
votes
0 answers

Java GUI progress bar

Hi I am trying to implement a progress bar into my java code. My java code consists of a graphical user interface that runs an executable file via processBuilder, and streamGobbler. When I implement this code for the progress bar: private void…
funSizes
  • 57
  • 1
  • 8
0
votes
0 answers

Use swingWorker with other classes

I'm starting to work with Java GUIs and I have some problems with SwingWorker: I'm trying to do a simple UI to start a server, run some "slave" objects and finally, run a master object managing all the work. I define the problem in the master (the…
mreigosa
  • 1
  • 2
0
votes
1 answer

Modify this class render, change the size of the progress bar to variable?

I have this code: TableColumn column = jTable2.getColumnModel().getColumn(1); column.setCellRenderer(new ProgressRenderer()); class ProgressRenderer: class ProgressRenderer extends DefaultTableCellRenderer { private final JProgressBar b = new…