Questions tagged [jprogressbar]

JProgressBar is a Java Swing component that visually displays the progress of some task.

jprogressbar
Filter by
Sorted by
Tagged with
0 votes
2 answers
61 views

Why does adding an indeterminate JProgressBar to JTable kill the animation?

I'm reverting a JavaFX UI to Swing. In the UI, I have a table of tasks with progress bars. When a task is of indeterminate length, I'd like to use an indeterminate progress bar. Unfortunately, I ...
6 votes
1 answer
20k views

Basic Indeterminate JProgress Bar Usage

I simply want to have an indeterminate JProgressBar animate in the bottom left corner of my frame when a long download is being done. I've looked through many tutorials, none of which are clear to me. ...
2 votes
2 answers
777 views

how to make the progression of a progressbar swing?

I would like to creat an apllication that install files in devices. but i have a problem to implement the progress, the code that i use in my fram to call the class to install is given below, ...
0 votes
0 answers
10 views

I wanted fill() method to run again when the button "Retry" is pressed. But when i press button nothing happens? What I can do?

this part is mostly where i declared panels, labels, and other things like progressbar, slider import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ...
1 vote
2 answers
54 views

Update progress bar with data comming from an inner class in Java

I have a primary class, with the swing components, that calls a secondary class that makes lots of stuff that I want to show a progress bar for. How can I do that without having to bring the whole ...
1 vote
0 answers
40 views

How to show JProgressBar for InputStream while reading data from a SerialPort?

I'm trying to show a JProgressBar in a Swing application used for communicating with a device using a SerialPort connection. Sometimes the data that the device sends is large so it can take some time(...
0 votes
1 answer
62 views

JProgressBar moves instantly and not gradually (java)

I want to make a ProgressBar move gradually using a Jbutton. To achieve this I am using a for loop and the method Thread.sleep. The problem is that insted of moving a tiny bit every second (the ...
18 votes
3 answers
55k views

How to change JProgressBar color?

I Used .setBackground and .setForeground and they didn't work, the color is like Orange, can't change it.
-1 votes
2 answers
36 views

In this case, how should I access to the JProgressBar from another class?

I am currently practicing OOP with Java. I have created a GUI project via WindowBuilder with Eclipse IDE and below is the result. private JFrame frame; /** * Launch the application. */ public ...
-1 votes
1 answer
472 views

Add jProgressBar to Java mail application

I'm trying develop a Java application for sending email. I'm using Java mail. I want to add file attachment option for this application. I did it. But now I need to add a jProgressBar to this ...
0 votes
1 answer
37 views

How to call a class with JProgressBar first & then run the main program?

I have created a separate class which displays a splash screen containing Progress Bar and I have a separate class where my main program starts from. When the program is started I want the Progress ...
1 vote
1 answer
166 views

how to change the color of JProgressBar

1 I am trying to change the color of the progress bar but it stays orange here's the code: test(){ UIManager.put("ProgressBar.background", Color.BLACK); UIManager.put("...
0 votes
0 answers
46 views

Why my frame is invisible every time I call it from the JButton?

I'm creating a Loading Page for our group project, but every time I call the loading page class, it is invisible. Here is my Main class: public static void main(String[] args) { new caller(); ...
0 votes
0 answers
581 views

Java music player progressBar

I was trying to create a simple music player only for become more fluent to use swing components. Whatsoever, I am stuck a just like this. It has no compiler or runtime error, rather creates a window ...
0 votes
0 answers
26 views

JFrame with JProgressBar not showing components while reading file [duplicate]

I am writing code to read an Impulse Tracker module file into this object. It opens a JProgressBar while the file loads and displays which part of the file is being loaded. The JFrame that displays ...
2 votes
1 answer
104 views

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 ...
1 vote
1 answer
725 views

How to add progressbar to while? Java

I'm not newbie but also prof. on Java. I'm trying to add progressBar to my application which send pings to given ip range with isReachable() method. How can i add? I dont know task and thread usage. I ...
0 votes
2 answers
6k views

Creating a Progress Bar to update with results from a for loop in java [duplicate]

I have created a for loop that counts from 0 to 850000. I have chosen a high number because I want to create a progress bar that will update using the results in the for loop. Here is the code that I ...
-1 votes
1 answer
418 views

JProgressBar foreground color not changing on JButton click

Problem: The problem I have run into is that when I click on the "Play" button or the "Feed" button, the pet will change its statistics, but the JProgressBar color will not change ...
0 votes
0 answers
116 views

Progress Bar is not filling in properly

I want to make a simulation hack program because I'm bored. I want it to fill a progress bar, here's the method for that: public void HackFrame() { double count = 0; outerloop: for(char i =...
3 votes
2 answers
2k views

How to use Netbeans' indeterminate progress-bar style?

I'm programming a Java app using Nimbus look & feel. Unfortunately, the appearance of indeterminate JProgressBars of Nimbus look & feel is AWFUL (see below) : On the other hand, I've noticed ...
3 votes
4 answers
35k views

Progress Bar Java

I am using JProgressBar to show progress. But, How to show the progressBar as loading from 0 to 100? I got the code from internet and its working except the progressBar is not loading. code ...
0 votes
1 answer
134 views

A method is running after execution of other lines

I have a program that downloads a file on a button click and I wanted to show the download percentage on a progress bar but the progress bar was not updating and I used a void class for it to not be ...
0 votes
0 answers
159 views

JavaFX app crashing or freezing when button clicked for downloading and showing the progress in a jprogressbar

I am writing a java app using netbeans IDE and using the gui creator, I created a simple project and some buttons for downloading a jar from a website, but, when I click on the button app freezes/...
1 vote
2 answers
919 views

Java GUI - Progress bar doesn't update until the async task is finished

I am using CompletableFuture to run a long running operation. Meanwhile, i use SwingWorker to update a progress bar with increments of 5. JProgressBar progressBar = new JProgressBar(); ...
10 votes
1 answer
2k views

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 ...
0 votes
1 answer
99 views

JProgressbar doesn't display when invoked from an ActionListener

I have a generic Java class for a simple progress indicator. It works fine if invoked directly (e.g. from main() or from a class constructor). But I can't get it to work when I create a simple menu ...
0 votes
2 answers
223 views

Java - JProgressBar won't change value, and JLabel won't change text

I am writing a program in Java and I want to add a loading page where it displays a progress bar and a label saying what is loading and the bar showing how far it is to completing, I have everything ...
0 votes
0 answers
88 views

ProgressBar crashed

I am trying to use a JProgressBar, but my code is really slow and almost crash each time I run my application. At the beginning, the progress bar is set to indeterminate, then when you hit the button &...
0 votes
1 answer
52 views

I don't know how to reset all the function in the 2nd frame after i hit the okay button on the JOptionPane. What to do?

I am using JCreator as my IDE and this program has two frames 1st is the startup frame you will just press start and my problem is on the 2nd frame which is I want to reset the all the function in ...
6 votes
2 answers
12k views

updating a JProgressBar while processing

I know the subject has already been seen on many Questions and has been answered, but still, I can't get trough it. I just want to update a progressBar while extracting some stuff of a large xml file....
0 votes
0 answers
61 views

How to use a JProgressBar correctly

I am trying to develop a function on a button that reads an excel file and generates a custom formatted .TXT file. My problem is that I want the loading of the data row by row to be shown in a ...
0 votes
1 answer
40 views

Need to apply Swing timer, but haven't been sucessful

Apologies If I sound stupid. I'm just starting. I've had little to no classes yet. I wanted to apply a time delay to my for loop. I tried with thread.sleep but it makes the whole GUI non operational. ...
0 votes
2 answers
202 views

External ProgressBar is not running in concurrent with Button Action Listener

I created one external class with Swing worker that runs the progress bar. This is the code, public class ExtProgressMonitor extends JFrame { private static final long serialVersionUID = 1L; private ...
0 votes
1 answer
239 views

Update JProgressBar from a SwingWorker [closed]

I am new to Java and trying to build an application that receives 6 inputs from JSwing TextFields. I have around 5 checkboxes. Based on the selection, some of the details are fetched from database. ...
0 votes
2 answers
299 views

How to add a JProgressBar which works with a Timer in my code?

I want to add a JProgressBar in my code, which counts till 5 (in seconds). After that, it shall make new values, but my current problem is, that I can't even make the ProgressBar with my ...
6 votes
5 answers
16k views

My JProgressBar is not Updating Until it is 100%

Ok, I have the following code. public class MyProgressBar extends JPanel implements MyData, Serializable { /** * */ public static final int MAX = 10000; public ...
0 votes
2 answers
53 views

JProgressBar doesnt update in for-loop when loading images

I am programming a little tool to apply some filters to a large amount of images. I want to add an progressbar while loading in images. For this i've written this simple code here: //Set ...
0 votes
1 answer
581 views

How to fill progressBar using separate thread?

I'm currently working on the following problem : How to use a thread in order to fill a progress bar (step by step) when the start button is clicked. I encountered no problems building the thread or ...
0 votes
0 answers
39 views

How can I use swing jProgressBar in java to increment upto 100% while inserting records from jTable to Database?

I have tried to do the following code but the problem is jProgressBar only updates and increment by a value when all the action is complement. I would wish the bar to increment step by step ...
1 vote
1 answer
1k views

How to run method with JProgressBar

I have a function called CreateAccount. I need it to run and also need to show a progress bar. When I click the button, the method will start. And I need to start showing loading progress bar. Once ...
0 votes
1 answer
267 views

Java: How to have a definite JProgressBar to load things?

I understand how to do indeterminate progress bars but I don't understand how to do determinate ones. For example say I'm using a JProgressBar to indicate I am loading a game. In loading this game I ...
0 votes
2 answers
113 views

How to change JTextArea when Progress Bar is 100%

I am very new to Java language and I started to make a program just by myself and the internet. For now I have this : package com.butoane; import javax.swing.*; import java.awt.event.ActionEvent; ...
2 votes
1 answer
87 views

Call a function after a Thread is completed

i'm writing a Sftp-client program using Jsch. I am using JProgressBars to display the Progress of Uploads and Downloads. My GUI contains Buttons according to the files in my Working Directory. When i ...
3 votes
1 answer
127 views

Reading a big text document and filling up a JProgressBar as it's being read

I'm trying to figure out how to make a JProgressBar fill up as a file is being read. More specifically I need to read in 2 files and fill 2 JProgressBars, and then stop after one of the files has been ...
0 votes
1 answer
2k views

How do i put a JProgressBar into a JOptionPane in java?

Can anyone tell me how i can make a progress bar go from 1 to 100 percent in a JOptionPane. Its not meant to show anything in particular or have any significance, its just for fun and to simulate ...
3 votes
4 answers
15k views

Optional <Integer> cannot be converted to Int (for use on GUI Progress Bar)

I am receiving below error, when I try to set value on a JProgressBar. "Optional cannot be converted to Int" Could someone please advise any workarounds/Solution?? public GUI(){ ...
0 votes
0 answers
32 views

JProgressBar won't display

I've been writing an ftp server app and i need to show an indeterminate progressbar on the screen.But it won't show. I've repainted the user interface,yet it won't show. the code is: JProgressBar pb =...
0 votes
0 answers
12 views

Progress Bar value is not updating [duplicate]

Here runQuery() function executes a query on 4 databases. I want tprogrssBar value should be updated to 50 on screen before it starts running runQuery() function. But screen gets updated after ...
2 votes
2 answers
469 views

JProgressBar update and thread scheduling

Hello stack exchangers, I have a problem with progress bars in java Swing. I think my confusions arise from my poor understanding of threads and the Swing event queue (I don't know much about java ...

1
2 3 4 5
10