Solved

ProgressBar

Posted on 2001-06-04
5
285 Views
Last Modified: 2012-05-04
Hi
I have a problem in my current application(Works as application and applet also).
 
What it does basically is it sends a command to VB through Perl script and waits for the resultimage. As soon as it finds the image in the path it fetches that and shows that on screen.

Main thread waits and second thread waits and gets the image and as soon as it gets the image it notifies the main thread.
But now I want to show a ProgressBar while it is waitng for the image, but the problem is as the Main thread is waiting, the progressBar(Or even any animated gif) is not working. It is just showing the empty window.

Do you have any ideas...solutions????

Thanks in Advance
Samisrini
0
Comment
Question by:Samisrini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:JDay
ID: 6153929
Have you tried useing a progress bar?


       // Create a new JProgressBar
        METER_bar = new JProgressBar(0, 100);
JDay
0
 
LVL 92

Expert Comment

by:objects
ID: 6154324
Can we see the code handling the progress bar pls.
0
 

Expert Comment

by:JDay
ID: 6156036

I have extended JDialog and added the progress bar to a panel. This is a method I use to display the meter.
This works for JBuilder 4. What are you useing to build your java program?


JProgressBar METER_bar = new JProgressBar(0, 100);

Use a method to display status bar and percentage complete

    public void Display(int total, int amount)
    {
        // Make the frame visible
        this.setVisible(true);

        // If incorrect value is passed in, return
        if ((total == 0) || (amount > total))
            return;

        // Set METER_total equal to total passed in
        if (total != METER_total)
            METER_total = total;

        // Set METER_amount to amount arg passed in
        METER_amount = amount;

        // Call Draw() to update progress bar
        Draw();

        METER_bar.repaint();
    }



JDAY
0
 
LVL 5

Expert Comment

by:vemul
ID: 7752078
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
Banath earned 0 total points
ID: 7842697
Per recommendation - PAQ'ed and points NOT refunded

Banath
EE Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question