Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:40:31+00:00 2026-06-09T21:40:31+00:00

I am not too experienced with Java and am having trouble getting a progress

  • 0

I am not too experienced with Java and am having trouble getting a progress bar to work. I am using Netbeans’ built-in GUI maker. Currently my program reads in images from a directory into an image array. Obviously this takes a bit of time, thus I would like a simple progress bar to update the user to know how far the loading is. I have used one of those drag-and-drop progress bar components.

  • I currently can get the number of files in a directory and can calculate the percentage of files loaded
  • The files successfully load into the array, but the progress bar is only updated after all files are loaded. I have tried revalidating and repainting while I loop but this does not work
  • I have tried the various tutorials on docs.oracle but can’t seem to get anything working.
  • I believe SwingWorker is the class I should be using, is this correct?

Any help with an example or some advice would be greatly appreciated!
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:40:33+00:00Added an answer on June 9, 2026 at 9:40 pm

    Yes, you have run into the trap of all new Swing programers – the Event Dispatching Thread

    Basically speaking, this Thread is the heart of any Swing system. Is is responsible for dispatching events to all the UI components, as well as making requests to the repaint manager to update the UI.

    If you do any time consuming tasks while in the EDT, you will prevent the UI from been updated.

    I’d suggest you start by having a read through Worker Threads and SwingWorker and Concurrency in Swing and, because I know you’re going to ask, have a read of this answer, it has a number of examples of using SwingWorker, JTextArea appending problems

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not experienced with SQL queries too much so I'm having some trouble in
I'm not all too greatly experienced with Java, I know enough to get me
This may be a silly question, but I'm not all too experienced with iPhone
I'm working with PHP and MySQL, and I'm not too experienced with database design.
I'm not too familiar with Java and need some help with an enumeration lookup
I may be wrong as I have not got too much experience with Java,
Not too sure what's going on here as this doesn't seem like standard practise
Not too sure how to formulate my question and I hope that this is
Not too sure if I'm doing this right. It looks a bit more convoluted
I remember the days (not too long ago, really) when log4net came along with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.