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

Percent of done project

I have an assignment regarding Java NIO and Thread. I should write a program with these four important abilities: copy, cut, rename, and delete. I made 4 classes for each part of project. All of them extend Runnable and in the run I used some code…
Naeem Baghi
  • 811
  • 2
  • 14
  • 29
0
votes
2 answers

JProgressBar is invisible but progress is updating correctly

I execute the task in this class and the Dialog pops up as a white box. The print statement IS printing out the progress values I'm expecting, but nothing shows up on the Dialog until after the operation is complete. I can see the progress bar flash…
Michael Groleau
  • 81
  • 1
  • 2
  • 9
0
votes
0 answers

Show the progress of a task with an indefinite time

I need to show the progress of a task in my project in these case the progress of the method ProcBaseCentral(jfSelectorArchivo.getSelectedFile()), in the progressbar. This method calls a sql query that takes a indefinitly time to finish.The…
jdrageme01
  • 69
  • 3
  • 9
0
votes
4 answers

How do I track reading of a a file using .readLine() in java?

I am reading a file using bufferedREader ,the file is a text file with lot of text here is how I am reading it while(true) //I know the loop is not perfect just ignore it for now, i wanna concentrate on the tracking { …
Snedden27
  • 1,870
  • 7
  • 32
  • 60
0
votes
1 answer

JProgressBar - Won't work in the class that I am calling it in

I'm making a project and need a progress bar. I've got the class with the Timer and it runs fine when I include a main; but when I try to call it in the mainGUI method, it's all black until it hits 100% then appears. package…
0
votes
2 answers

why JProgressBar value does not refreshed?

What i am trying to do is when i click a button, i copy some files from a portable drive like usb and copy those files to my local drive, then i read all csv files which i copied ealier and i put it's values in an arraylist and inject it to…
NomNomNom
  • 811
  • 3
  • 12
  • 37
0
votes
2 answers

Java - How to use JProgressBar with SwingWorker

I am creating a Java application with a downloader. My problem is, the progress bar is not working. I want my progress bar to show the download progress but failed. Here is some part of my code. The progressbar just stuck at…
Jeremy
  • 641
  • 1
  • 7
  • 15
0
votes
1 answer

How to set the jProgressBar working according to the time taken for a task in java

I m developing application that encrypt decrypt files, i want to use a jProgressBar according to the real time taken to the process.
user2136160
  • 235
  • 2
  • 5
  • 13
0
votes
1 answer

JProgressbar with 2 or more different colors at one instance

I wanted to create a jprogressbar that has a specific color on a specific range (eg. 50% green, 50% red). Is there a way to do that? What i currently have is a progressbar that changes the color of the whole bar. By the way i am not using any look…
Jer Yango
  • 582
  • 2
  • 8
  • 22
0
votes
1 answer

jprogressbar not working properly( may be due to threading)

i have code as follows public class panel extends JPanel{ String sh; String su; String sp; int sp; final static int interval = 100; int i; Timer timer; public static JProgressBar pbar; public int getsport() { return this.sport; …
0
votes
1 answer

Jprogress bar keeps track of download

Note: I have searched for hours going through hundreds of threads on multiple different sites but none of them are what i want to do. Couldn't even find some i could put together like a puzzle. Making a new class for it is something i prefer. If…
Ryan
  • 359
  • 2
  • 8
  • 15
0
votes
0 answers

Java Application not functioning completely in Windows 8 (JProgressBar)

I've been working on an issue in which it took me days to find out the cause. The issue is that i can't upload data from my java application to my remote database server. And finally I figured out what causes the problem. It is actually something…
elL
  • 767
  • 2
  • 14
  • 35
0
votes
0 answers

change JProgressBar color

How can I change the color of JProgressBar in java? Java is using nimbus look and feel by default. Some stackoverflow answers showed some very complex code using painters. Is there a simple solution to this?
user2756339
  • 685
  • 1
  • 10
  • 17
0
votes
0 answers

ProgressBar % text

SO I used the: ProgressBarDemo.java on Java tutorials. How would I go on adding if 20% { taskOutput.append(String.format("Completed %d%% of task.\n", task.getProgress())); if 40% { taskOutput.append(String.format("Completed %d%% loading region.\n",…
0
votes
1 answer

How do I use setCellRenderer properly?

Right now I have this code jTable1.getColumn("Progress").setCellRenderer(new TableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable arg0, Object arg1, boolean arg2, boolean arg3, int arg4, int arg5) { …
user2519193
  • 211
  • 2
  • 14