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
1 answer

java program flow on example of DynamicReports and progressbar

i use DynamicReports library for make reports for my app. Createing report takes some time and i decided create custom progress bar while reports has not been created. Question after code examples. progress bar class: public class ProgressDialog…
Mrusful
  • 1,503
  • 1
  • 18
  • 32
1
vote
1 answer

How to update jprogress bar inside jtable

i'm developing an app that has a jtable and user could start a download. i want to add in the table the name of download, the state and progress bar. I'm doing like this: INIT JTABLE: ( CODE CREATED AUTOMATICALLY BY NETBEANS ( is there a way to edit…
Jayyrus
  • 12,961
  • 41
  • 132
  • 214
1
vote
1 answer

JPanel doesn't load in JFrame

I have a problem showing my progress bar when reading a file in Java. All works as intended, user choose a file, the program must show the progress bar (but it loads an empty blank frame), process the file and then load the results on another…
1
vote
2 answers

Calculate a percentage progression based on events

I have to implement a progressbar that show the progress of a report generation, the problem is that i have to represent the percentage of the report progression based on event generated by the generation but without first knowing the total amount…
aleroot
  • 71,077
  • 30
  • 176
  • 213
1
vote
1 answer

How to display a number without % sign in Java's JProgressBar?

When I use JProgressBar, I want it to display a number from 0 to 32, not a percent, so before it starts, it will show 0, after I click start button, it will show 1 , 2 , 3 ... 32 How to do it ?
Frank
  • 30,590
  • 58
  • 161
  • 244
1
vote
2 answers

progress bar in Notification area is not closing and not starting the second progress bar

in my app i have 4 buttons and when the user clicks any of the button it starts downloading a file and the progress bar gets shown in the notification area. The downloading and progress bar is working fine, but i have the following two…
Siva K
  • 4,968
  • 14
  • 82
  • 161
1
vote
1 answer

ExecutorService JProgressBar

This is probably a simple one, but I've tried loads of different things and no matter what I try, I can't get this to work. Basically I have a JProgressBar that I want to update as I process the task list. The tasks are quite short, but there is a…
PeterM
  • 2,534
  • 6
  • 31
  • 38
1
vote
2 answers

Update progress bar with data comming from an inner class in Java

I have a primary class, with the swing components, that calls a secondary class that makes lots of stuff that I want to show a progress bar for. How can I do that without having to bring the whole code from the secondary to the primary class? Here…
1
vote
0 answers

How to show JProgressBar for InputStream while reading data from a SerialPort?

I'm trying to show a JProgressBar in a Swing application used for communicating with a device using a SerialPort connection. Sometimes the data that the device sends is large so it can take some time(5-10 seconds) to receive the data. Because of…
1
vote
2 answers

JProgressBar update

Could someone help me ? I would be grateful. I've got example code: .... int sizeFile; RandomAccessFile raf; InputStream in; int val= 0; int downloaded= 0; while((val=in.read(buff)) != -1) { raf.write(buff, 0,…
pneumatic
  • 49
  • 1
1
vote
1 answer

how to change the color of JProgressBar

1 I am trying to change the color of the progress bar but it stays orange here's the code: test(){ UIManager.put("ProgressBar.background", Color.BLACK); UIManager.put("ProgressBar.foreground", Color.RED); …
yona masa
  • 13
  • 2
1
vote
2 answers

How to use javax.swing.JProgressBar to start at a certain time and finish at a certain time?

I'm new to Java and I'm building a program that works as basically a real-time schedule. What it does is displays the event, followed by a progress bar, the time of the event (such as 8:00 - 9:00) and the time left in the event. How would I program…
Ryan
  • 882
  • 10
  • 11
1
vote
2 answers

Java GUI - Progress bar doesn't update until the async task is finished

I am using CompletableFuture to run a long running operation. Meanwhile, i use SwingWorker to update a progress bar with increments of 5. JProgressBar progressBar = new JProgressBar(); progressBar.setMinimum(0); …
1
vote
1 answer

Java ProgressBar in swing

i have a desktop GUI in swing , i want to show status of user storage used in the GUI, currently i am using JProgressBar, which is not much attractive, It seems like a simple progress bar. Please suggest some attractive way to do.
Asghar
  • 2,336
  • 8
  • 46
  • 79
1
vote
2 answers

Controlling JProgressBar height

I am creating a java swing app which makes use of the JProgressBar control. The control looks ok on Linux and Windows but it is too big for my likings on Mac. I would like to change its height. I am constructing the entire layout via boxes, i.e.…
Pass
  • 1,501
  • 4
  • 21
  • 39