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

Can a progress bar be used in a class outside main?

Right now, my main just calls a gui with 10 rows. Based on how many of those rows have text, 1 of 9 classes is called (two rows must have text). The called class performs calculations that I'd like to have the progress bar tied to. Here is an…
user568422
  • 401
  • 1
  • 4
  • 7
20
votes
8 answers

How to add text on jprogressbar?

I am using a jprogressbar to indicate the availability status. i want to display a text of 40%[assumption] inside the progressbar. how to do it? the text was changed according to the availability value
Siddhu
  • 1,188
  • 2
  • 14
  • 24
18
votes
3 answers

How to change JProgressBar color?

I Used .setBackground and .setForeground and they didn't work, the color is like Orange, can't change it.
Ali Bassam
  • 9,691
  • 23
  • 67
  • 117
15
votes
3 answers

How to monitor progress (JProgressBar) with FileChannels transferFrom() method?

I need a little help with the JProgressBar component. My program copies files from one place to another using java.nio FileChannels. The actual copy method is transferFrom(). I've got two questions now. How to I monitor the transfer progress of…
Peter
  • 617
  • 1
  • 7
  • 13
14
votes
4 answers

Progress bar while copying files with Java

I'm sure this question has been asked before, but none of the answers I found will work very well with my existing code. I'm posting this question in case there's a way to do it without completely redoing what I have so far. The idea is to display a…
DerStrom8
  • 1,311
  • 2
  • 23
  • 45
14
votes
1 answer

SwingWorker ProgressBar

I am trying to get a progress bar to accurately reflect my SwingWorker. But I really can't figure out how to do it. I got the bar to just do a static animation until the operation has completed but I want a real active bar. /* * To change this…
Kyle
  • 2,339
  • 10
  • 33
  • 67
13
votes
3 answers

adding progress bar to each table cell for file progress - Java

The application encrypts each file that is put into the table when you click encrypt and I would like to show the progress of the files as they are being encrypted. The "Status" column will then change from "Not Processed" to "Processed." Similar…
rogerthat
  • 1,805
  • 4
  • 20
  • 34
11
votes
2 answers

Nice looking progress bar in java

I'm wondering if any of you know how to display a nice looking progress bar in Java, mostly using Swing, although I don't mind using third-party libraries. I've been looking at JProgressBar tutorials but none of them refer to styling the bar.…
AlejandroVK
  • 7,373
  • 13
  • 54
  • 77
11
votes
1 answer

Pretty alternative to JProgressBar?

I'd like a nice progress bar for long running processes. Are there any pretty alternatives to JProgressBar out there, specifically for indeterminate processes? I'm thinking of Web-2.0-looking twirls, spinning wheels, what have you. Imaginary bonus…
Epaga
  • 38,231
  • 58
  • 157
  • 245
11
votes
2 answers

Java: JProgressBar (or equivalent) in a JTabbedPane tab title

If I really wanted to do something like that, can I put a JProgressBar (or it's equivalent) in a JTabbedPane tab? (I mean, not in the tab itself, How would I do something like that? EDIT I really do want to put the progressbar in the title of the…
NoozNooz42
  • 4,238
  • 6
  • 33
  • 53
10
votes
1 answer

How to make JProgressBar match Windows LaF?

I've been working for a while with JProgressBar using WindowsLookAndFeel, but I found some major differences from the native progress bar: Here is the native bar, in its regular state: While this is Java's: A sharp eye might see Java's top white…
Mordechai
  • 15,437
  • 2
  • 41
  • 82
9
votes
1 answer

Can I make ProgressMonitor dialog modal?

is there a way to make the dialog from ProgressMonitor modal? EDIT: The ProgressMonitor class in JAVA API will bring a dialog which is on the top but not Modal. User still has access to the background GUI. I am looking for a Modal dialog to show the…
5YrsLaterDBA
  • 33,370
  • 43
  • 136
  • 210
9
votes
1 answer

Draw a String onto a ProgressBar, like JProgressBar?

I recently started working with JavaFX, and started making FX versions of my custom Swing components. One of them was a count down timer, in which a JProgressBar was involved. I would draw the current time onto the bar using it's setString(String)…
mattbdean
  • 2,532
  • 5
  • 26
  • 58
8
votes
2 answers

Setting the colors of a JProgressBar text

I have these progress bars: I'm trying to set the color of the TEXT of the progress bars, without changing the background color or the color of the progress bar itself. As far as I can tell, setForeground() sets both the text and the bar color? …
zigdon
  • 14,573
  • 6
  • 35
  • 54
7
votes
3 answers

JProgressBar: low values will not be displayed

I tried out the function of the JProgressBar in Java. But there is a problem I couldn't solve: When I set the minimum to zero, the maximum value to 100 and the current value to 6 then nothing will be displayed. The progress bar is empty. If I put 7…
Benchy
  • 126
  • 1
  • 4
1
2 3
32 33