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

JProgressBar too fast

I am trying to add a progress bar. everything works and i don't get any error. But the progress bar goes from 0% to 100% without even going through the values between it (I mean it's too fast, and the users are unable to see the progress bar blocks…
user1315906
  • 3,374
  • 8
  • 30
  • 43
3
votes
3 answers

JProgressBar while data loading in swing

I have a server call from the UI. It has response time is little high. So I was thinking to display a progress bar during data loading from the server. I have tried the following code using this approach to show the progress bar. Some where I am…
Amarnath
  • 8,736
  • 10
  • 54
  • 81
3
votes
3 answers

How to show a JProgressBar when downloading a file from an FTP server

I am using apache commons-net for downloading a file from an FTP server. That much is working fine. The part I am having a problem with is showing the download progress using a JProgressBar. The following code demonstrates how I am downloading the…
Harsha
  • 3,548
  • 20
  • 52
  • 75
3
votes
1 answer

Progress Bar used as Health Bar

I am making a java game that has a sidebar that displays a player's health. I want the bar to be like a progress bar which is along the lines of the picture below: Would a progress bar be capable enough to accomplish this? If not, what will?
Anonymous181
  • 1,863
  • 6
  • 24
  • 27
3
votes
2 answers

Java Task Progress Bars in Swing

I need a very simple (skeletal) tutorial on progress bars for developing a GUI in Java. The progress bar can be "indeterminate" and ideally have an updateable text label. Here is some skeletal code that I hope someone can expand upon just enough to…
Bill
  • 2,319
  • 9
  • 29
  • 36
3
votes
1 answer

How do you create an accurate progress bar for a task with an unknown length?

If I read a file until it hits a null line and want to create a somewhat accurate JProgressBar for when the reading will be finished, how would I do this? The reason I ask is because some files are read within 200ms where as others take between…
WilliamShatner
  • 926
  • 2
  • 12
  • 25
2
votes
2 answers

jTextfield and progressbar not working

I have a main class(which is basically a netbeans form;drag and drop) from where my application starts and another class(call it class 2) where my functions resides.I first call a function in class2 from my main method and that method has a while…
Xara
  • 8,748
  • 16
  • 52
  • 82
2
votes
2 answers

java swing JTable JProgressBar margin

My question like this: I have a JTable, I put a JProgressBar in one Column, but it fill the full cell. I just want to set JProgressBar's size so that it shows with margin with cell border. My JProgressBar code: private final JProgressBar b; public…
chenhai
  • 35
  • 4
2
votes
1 answer

setString of a JProgressBar more than once

I'm writing a program which has two main phases: determining the region of interest, and then recognizing objects in that region. My interface has a single JProgressBar and I want it to indicate what phase is it currently working on. I noticed that…
skytreader
  • 11,467
  • 7
  • 43
  • 61
2
votes
2 answers

JProgressBar Animation in a Table

I have the following Problem: I have a JTable which shows me the progress of a command. I have 2 sort of commands. Determined and indetermined commands. If i only have indetermined progressbars in the table the progress is shown correct. but if i…
NotANormalNerd
  • 415
  • 3
  • 14
2
votes
2 answers

How to update jprogress bar

I have a simple JForm and a JDialog in my application. JDialog box contains a JProgressBar eliment and I'put a method in the JDialog as, public void updateProgress(int val){ prgProgress.setValue(val); //prgProgress-> name of the…
Harsha
  • 3,548
  • 20
  • 52
  • 75
2
votes
2 answers

Displaying a custom progress string on a JProgressBar

When setStringPainted() of JProgressBar is used,the amount of process completion is displayed in terms of percentage.But how can i customise setStringPainted() so that i can display remaining time instead of percentage?
svkvvenky
  • 1,122
  • 1
  • 15
  • 21
2
votes
4 answers

JProgressBar not visible until told to show

I'm trying to make an application which shows a JProgressBar only while it is performing actions. My problem is, when the program is first opened, I set the JProgressBar visibility to false, then to true when an action is being performed and after…
user882347
2
votes
1 answer

JProgressBar in JTable problem

I've got some problem, does anyone can help me ? Below is my code: public class Test { public static void main(String[] args) { Panel.panel.setVisible(true); } } class Panel extends JFrame implements Runnable { public…
pneumatic
  • 49
  • 1
2
votes
1 answer

JProgressBar positioning to bottom of the window

I was trying to position a JProgressBar to the bottom of the window's screen. I have tried using setVerticalAlignment and setHorizontalAlignment. When doing so a syntax error appears. To make it clear my goal is to put a progress bar at the bottom…