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 918853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:26:41+00:00 2026-05-15T18:26:41+00:00

I was adding a loading bar feature to my program in Java and I

  • 0

I was adding a loading bar feature to my program in Java and I was wondering if I could set a list of processes that need to be done, so that it knows how many processes it needs to complete.

For example, saving them as strings?

ArrayList<String> processes = new ArrayList<String>();
processes.add("CSVWriter.createFileOfCompany(\"Random Company\");");
processes.add("FileConverter.convertCSVToXLS(classPath + 
    \"/Output/Random_Company.csv\");");

for (int i = 0; i < processes.size(); i++) {
    // run process
    // update loading bar
}

These aren’t real methods to my program, but they are pretty similar to what I want to accomplish.

I’m sure this isn’t the best way, but I want to have some way to create a list like this so I know how many processes there are before I run them. I have a system set up to break down these processes even further and show their progress, so this bar is pretty precise at the moment, but I have to number each of the processes =/.

Maybe I’m just missing the point. Creating progress bars is totally new to me.

If there are any good articles on progress bar creation, feel free to send them my way as well. Keep in mind that I’m not using an actual swing-based GUI. This bar is all S.O.P text.

Many thanks,

Justian Meyer

  • 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-05-15T18:26:42+00:00Added an answer on May 15, 2026 at 6:26 pm

    Closures will hopefully be coming soon in the next version of Java, but until then you can use anonymous classes implementing a known interface:

    List<Runnable> jobs = new ArrayList<Runnable>();
    
    jobs.add(new Runnable() {
        public void run() {
            CSVWriter.createFileOfCompany("Random Company");
        }
    });
    
    jobs.add(new Runnable() {
        public void run() {
            FileConverter.convertCSVToXLS(classPath + "/Output/Random_Company.csv");
        }
    });
    
    for (Runnable job : jobs) {
        job.run();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 450k
  • Answers 450k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is here to support Internet Explorer 5 and encourage it… May 15, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer Provided the $req->getRawBody() is, as you say, the same as… May 15, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer Open the file in the Visual Studio binary editor (File.Open.File,… May 15, 2026 at 8:39 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.