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

  • Home
  • SEARCH
  • 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 9250337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:25:24+00:00 2026-06-18T10:25:24+00:00

I’m trying to create a pop up dialog progress bar preferably an Indeterminate but

  • 0

I’m trying to create a pop up dialog progress bar preferably an Indeterminate but that’s not too important. I have been looking through "Oracle’s ProgressBar Tutorials" and Google searching but not such luck in getting it to work. I’m pasted my code below of my Action Listener and the dialog will not pop up. Any suggestions?

Sorry this is my first post on this site. But how it works is that When I press the create button, it goes out and grab some information from different servers and directories and creates a file for me. That is what the new Project is. Features is a Enumeration I made that are set with the text in the JTextBox when the Create Button. The problem is that this process takes time to process, so I want the a progress bar to show that its processing

private class CreateButton implements ActionListener
{
    @Override
    public void actionPerformed(ActionEvent arg0) { 
        class Task extends SwingWorker<Void, Void>
        {
            @Override
            protected Void doInBackground()
            {                   
                //Set Variables
                for(Feature f : Feature.values())
                {
                    if(f.getComp() != null)
                    {
                        f.getVariable().setVariable(((JTextField) f.getComp()).getText());
                    }
                }

                new Project(jobs.getSelectedValue().split("-")[0].trim(), 
                            jobs.getSelectedValue().split("-")[1].trim(),
                            features);
                return null;
            }
        }
        
        ProgressMonitor pm = new ProgressMonitor(display, "Testing...", "", 0, 100);
        pm.setProgress(0);
        Task task = new Task();
        task.execute();
    }
    
}   
  • 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-18T10:25:25+00:00Added an answer on June 18, 2026 at 10:25 am

    This comes from the Oracle javadoc for ProgressMonitor:

    Initially, there is no ProgressDialog. After the first
    millisToDecideToPopup milliseconds (default 500) the progress monitor
    will predict how long the operation will take. If it is longer than
    millisToPopup (default 2000, 2 seconds) a ProgressDialog will be
    popped up.

    Note that it doesn’t pop up until at least 1/2 second after you create it. Even then, it only pops up if the process is expected to take over 2 seconds.

    This is all based on your repeated calls to setProgress(int) and the time between the progression of values across the range you gave it.

    I suspect the conditions that cause the dialog to pop up are not being met. Or, perhaps, your program exits before that amount of time goes by.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.