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

JFrame freezes during while loop

I am working on a Java program, which reads text files does some probability calculations. Reading files and all related calculations are done in a while loop. I had created a GUI using JFrame, where i had added a Progress bar (using JProgressBar)…
Ankit Rustagi
  • 5,539
  • 12
  • 39
  • 70
2
votes
2 answers

how to make the progression of a progressbar swing?

I would like to creat an apllication that install files in devices. but i have a problem to implement the progress, the code that i use in my fram to call the class to install is given below, execShellCmd is the method called to install to all…
2
votes
1 answer

JProgressBar not animating ONLY on Mac with Java 1.7

Here's some code that creates and displays a JProgressBar on the EDT. On Apple's Java 6, the progress bar animates. On Oracle's Java 7, it doesn't: import javax.swing.*; public class ScratchSpace { public static void main(String[] args) { …
Steve McLeod
  • 51,737
  • 47
  • 128
  • 184
2
votes
1 answer

Progress bar freezing while downloading file in java

Possible Duplicate: JProgressBar wont update So I am trying to show the download progress of a file being downloaded in Java. I can output the current percentage as a String to the console, but when I try to update the UI, it freezes until the…
AKrush95
  • 1,381
  • 6
  • 18
  • 35
2
votes
3 answers

JProgressBar wont update

I'm trying to add a JProgressBar to my program, but it wont update! The value only changes once it reasons 100%. Here's my method. public void downloadImages(List images) { if (errorCode == 0) { for (int i = 0; i < images.size();…
2
votes
2 answers

java - Progress Bar - Is it possible to use setProgess() of Progress Bar outside the doInBackground() method?

If I had a method inside the doInBackground() that belongs to other class is it possible to set setProgess() based on changes that happen in that other method of an outside class?
2
votes
1 answer

JProgressBar won't update

I'm trying the code I found on the voted answer from this question: Download file using java apache commons? It's a download application, take a little look, (I'm not much familiar with JFrames and ActionEvents) Download.java package main; public…
user1541106
  • 241
  • 1
  • 6
  • 12
2
votes
1 answer

Using swingworker to update a JProgressBar during download

QUESTION SOLVED!!!!!! Many thanks to trashgod and HoverCraftFullOfEels! I finally got the concept by using the below example and altering it slightly. The alteration allows scaling the progress bar (by default is 100 units). Again, THANK YOU for…
Kyte
  • 834
  • 2
  • 12
  • 27
2
votes
1 answer

Can't change JProgressBar color in Mac OS look and feel

I know this question has been answered before, but it's just not working for me. I followed the instructions from here: How to change JProgressBar color? import javax.swing.*; import java.awt.*; public class ProgressBarTest extends JFrame { …
akashnil
  • 253
  • 2
  • 10
2
votes
1 answer

progress bar not updating with threads

ok, I'm here again to ask one dummy question. I have a custom dialog frame and have progress bar on it. So also I have a genetic algorithm (which works pretty big amount of time). As I understand all the situation, I need to execute separate threads…
mr.nothing
  • 5,141
  • 10
  • 53
  • 77
2
votes
3 answers

Swing Indeterminate JProgressBar moving too fast

I have created a Swing JProgresBar and set indeterminate to "true". The progress bar works correctly but it cycles extremely fast and the it's annoying to look at for longer than 3 seconds. I want to slow it down and I thought there would be a…
Conner
  • 413
  • 2
  • 8
  • 20
2
votes
1 answer

How to stop JProgressBar on parent?

I am working on an application where I am using JprogressBar, When I am doing something then progress bar is running. I also added escape functionality there. when anyone click on Escape button of keyboard then focused Jpanel/Jdialog/JFrame is …
Ronak Jain
  • 2,402
  • 2
  • 24
  • 38
2
votes
2 answers

Progress Bar as Health Bar

Possible Duplicate: Progress Bar used as Health Bar Refer to: Progress Bar used as Health Bar When I read the JProgressBar api, it show the maximum as the end of a task. I want the maximum to be a player's health, such as 90/100. How could I be…
Anonymous181
  • 1,863
  • 6
  • 24
  • 27
2
votes
2 answers

Java ProgressBar with HTTP Upload don't update

I want my jProgressBar to update its value during HTTP File Upload. I'm new to Java and I'm not sure I'm doing the right things, here's my code: private static final String Boundary = "--7d021a37605f0"; public void upload(URL url, File f) throws…
user1376701
  • 35
  • 1
  • 5
2
votes
2 answers

How to set a progress bar between two jframes?

I need a progressbar in between two jframes;ie while navigating from one jframe to other the progress of loading that frame must shown in a progressbar.It should also show a message like 'Please wait....'.Please help
Anuradha
  • 107
  • 1
  • 2
  • 11