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

Ask how to give jProgressBar for my iteration

I want to ask how to give jProgressBar in my code. i used netbeans interface. progressBar will end after it reach maximum_iteration. jProgressBar already in other class. how can i fix it? Thank you. Please help. train() is placed in other…
Theresia
  • 33
  • 5
0
votes
0 answers

change the backgroundColor of progress bar in Java Netbeans

I am a newbie in Java, I need changing the background Color of a progress bar, but really I don't know how to do this I have a progress bar called "barrita" I am using Linux Ubuntu and Java 8 and I am using the palette of Swing package…
ruby student
  • 1,059
  • 4
  • 12
  • 18
0
votes
3 answers

Java - Progress Bar Not Progressing

All the coding runs, my only problem is that the progress bar doesn't display the value changes. I set the values, but if I run it the value set, doesn't display on the progress bar. (The bar doesn't fill up) public void logIn() { try { …
0
votes
0 answers

How I create a JProgressBar without reset the values until my method finish

the main problem is that I don't know how long my method will take to finish, I have 2 threads, one to execute the method that do stuff and the other one excute the progress of the progress bar, this is my first thread: @Override public void run()…
0
votes
1 answer

synchronize the jprogress bar

public class frame11 extends javax.swing.JFrame implements ActionListener, PropertyChangeListener { public String[] columnNames = { "Path", "File Name", "Size"}; public Object[][] data ; int…
sosono
  • 13
  • 1
  • 5
0
votes
1 answer

How can I get my JProgressBar to appear in my JPanel?

I've been going over this code for ages, and have no idea how to get my JProgressBar to actually appear on the GUI. When I run the app, the JLabel appears in the JPanel, but the JProgressBar does not, how do I fix this? (note: the JProgressBar does…
rgollum
  • 1
  • 1
0
votes
1 answer

How to Get selected folder name in java using JFileChooser?

I want to select the folder that is selected. JFileChooser targetDir = new JFileChooser(); targetDir.setDialogTitle("Choose Target Directory."); targetDir.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); …
Rahul K Jha
  • 788
  • 9
  • 18
0
votes
0 answers

Why the JProgressBar doesn't respect the setSize()?

I'm having an issue with the JProgressBar, when it is printed in the GridBagLayout it is too little and the setSize method doesn't have effect, just to test I wrote 100 and 20 but the size remains something about 10x10 and I don't understand why,…
Kaos
  • 107
  • 1
  • 1
  • 10
0
votes
0 answers

text alignment in JProgressBar on OSX

I have a JPanel with a number of JProgressBar components on it. It works fine with the default behavior of centering the paintString. I would like to left-justify all the paint strings. I don't see any way to apply formatting to the text string. I…
AixNPanes
  • 1,170
  • 3
  • 14
  • 33
0
votes
0 answers

Java Swing: JProgressBar is not showed

Following this guide I want to add a JProgressBar in my application while a long PDF document is being created after the apposite button is pressed. This is a skeleton of my method: /* asking data to database and getting a list of Objects */ JFrame…
SagittariusA
  • 5,289
  • 15
  • 73
  • 127
0
votes
3 answers

JProgressBar won't update dynamically

I have a JFrame class with this function inside: o=1; private String performTest(int i,File file) throws IOException, InterruptedException { //CRAPPY CODE while(o<=20) { Thread.sleep(1000); …
Denis Rozimovschii
  • 428
  • 1
  • 6
  • 19
0
votes
1 answer

How to receive bytes from a lib to update the JProgressBar?

I've tried to receive bytes from a lib to set my JProgressBar update for a long time but unfortunately I didn't get the result I wanted. The problem is that I don't know how to receive bytes from a lib and how to update the JProgressBar while…
Ahmed
  • 13
  • 6
0
votes
1 answer

Swing JProgressBar with multiple JLabels below

I have a problem concerning layouts in Swing. I have got a BorderLayout and want to add a JProgressBar with multiple JLabels below in the NORTH section of this layout all aligned horizontal next to each other. It should look something like this: I…
LarsBauer
  • 1,539
  • 18
  • 23
0
votes
0 answers

Java JProgressBar Update each run through of while loop

Hello I have a java program here and I am trying to make a progress bar. The while loop is within another class and will take a while to run so this GUI is supposed to show progress. While the while loop is running, however, the bar does not move…
Meeesh
  • 992
  • 1
  • 8
  • 15
0
votes
1 answer

Writing to set number of progress bars with set number of threads

I posted yesterday, when I had absolutely no knowledge of how progress bar works. After getting some help and working on it I have a lot more done, but I'm getting stuck at updating the bars with progress. I was trying to use my setProgress method…
Arian.No
  • 3
  • 1
  • 5