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

JProgresbar doesn't work with Files.copy

I am writing a program that creates a folder for each file in a specific folder. After that the file is copied in the, just created, folder. Everything works, except the JProgressbar I want to add to the program. I also added a Jtextarea but after a…
vanlooverenkoen
  • 2,121
  • 26
  • 50
1
vote
1 answer

Why this indeterminate jProgressBar don't work in this simple code?

I want use an indeterminate jProgressBar on a JForm but I don't know why in my code don't work. The jProgressBar must be in the indeterminate status until the thread receives a latch.await() signal. This is the simple part of code when I push a…
Local Hero
  • 493
  • 2
  • 7
  • 20
1
vote
2 answers

swing: making a JProgressBar with a label superimposed on it?

I would like to use a JProgressBar and augment it to print its current value as well as the graphical bar. I'm guessing the best way to do this is to override paintComponent: @Override protected void paintComponent(Graphics g) { // Let component…
Jason S
  • 184,598
  • 164
  • 608
  • 970
1
vote
1 answer

Progress bar Java doesn't update

I have tried a lots of tutorial and examples listed here, but doesn't work with me, i think this because i use netbeans. I tried : Progress Bar Java http://www.java2s.com/Tutorial/Java/0240__Swing/SwingWorkerandProgressBar.htm Progress Bar…
1
vote
2 answers

Changing the default cursor to busy cursor does not work as expected

After many attempts trying to make a JProgressBar work as expected, I finally became successful at achieving my goal. I had used @MadProgrammer's advice and used a SwingWorker to finally get the program work as I want. Now, I want the cursor to…
Spikatrix
  • 20,225
  • 7
  • 37
  • 83
1
vote
1 answer

Java - JProgress bar not showing (threaded)

I am adding a feature to a program to save some content to file. The progress is shown by a progress bar (in its own JFrame), but the progress bar is only being displayed on the last value it reads. I have a global being updated by the main thread,…
OrangePot
  • 1,053
  • 2
  • 14
  • 38
1
vote
1 answer

JProgressBar on WindowsLookAndFeel only updates in increments of 5%

Take this code: public static void main(String[] args) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException |…
ryvantage
  • 13,064
  • 15
  • 63
  • 112
1
vote
1 answer

How to browse subdirectories at ftp server

I am building a swing FTP client.Here is my code for jframe :- package jframe; import jframe.swing.download.*; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import test.FtpClient; import…
monu dwivedi
  • 550
  • 7
  • 15
1
vote
1 answer

JProgressBar does not fill all the way

I have a JProgressBar which I have set the maximum value to 150. With a javax.swing.Timer, I update the progress bar and increase the time variable by 1. The issue is that once time reaches 100, the progress bar will not update any more and remains…
TNT
  • 2,900
  • 3
  • 23
  • 34
1
vote
4 answers

Return Values & JProgressbar

I got a problem with setting a value to a JProgressBar which i got from inside a type returning method. I know I have to do multi threading but I´m really new to this topic and really don´t know how to implement this. I try to briefly explain my…
garlicDoge
  • 197
  • 1
  • 3
  • 18
1
vote
1 answer

How to get a JProgressBar to go to the "wait" screen

So, I want my progress bar to go to this sorta wait screen: Not really much else to say. Anyway I can set it to do this instead of the old percent thing?
3dsboy08
  • 146
  • 3
  • 12
1
vote
2 answers

JProgressBar instantiate it self multiple time

I'm trying to add a JProgressBar to a simple program just to learn. So far i can display it, but it adds multiple instance while i want just one to show. Here's the code : package package1; import java.awt.BorderLayout; import java.awt.Color; import…
Chax
  • 1,041
  • 2
  • 14
  • 36
1
vote
0 answers

NullPointerException when running a thread

I am using two different threads to extract a zip file and to display a JProgressBar. My first thread runs properly but second thread gives NullPointerException. Below is my code to start both threads:- final String command =…
Amit Anand
  • 1,225
  • 1
  • 16
  • 40
1
vote
1 answer

Indeterminate JProgressBar Not displaying String

I am making a virus scanning program (Starting making one) but I set the JProgressBar to indeterminate mode, and the setString(String str) method does not display a string. If I do not use an indeterminate progress bar, the String displays…
Java Is Cool
  • 552
  • 2
  • 5
  • 16
1
vote
1 answer

Jprogressbar.setStringpainted(true); is painting two strings

This code is creating a problem that is when I click the button two strings are being painted one horizontal and one vertical, but need only horizontal string to be painted, so please tell what should I do??? import java.awt.Color; import…