Results 1 to 4 of 4
  1. #1
    ynglsuresh is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Progress Bar using Awt help

    Hi

    I want to show the progress Bar when the process is running.if the process is done i will display result page.in the below code i used 1000 ms intervel..the progress will show till 1000 ms only..But i want to show the progress bar till the proces is running...

    find the below sample code

    pb = new JProgressBar(0, 20);
    pb.setValue(0);
    pb.setStringPainted(true);
    cPane.add(pb);

    //Create a timer.
    timer = new Timer(interval, new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    if (i == 20){
    Toolkit.getDefaultToolkit().beep();
    timer.stop();
    jbnRun.setEnabled(true);
    pb.setValue(0);

    }
    i = i + 1;
    pb.setValue(i);
    }
    });


    =============================================

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Progress Bar using Awt help

    I'm sorry, what exactly is your question/problem? I'm not really sure as yet.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: Progress Bar using Awt help

    ynglsuresh, it looks like you didn't bother to read my response on your earlier thread, so I won't bother repeating the advice here.

    I also won't bother to even attempt to discover what kind of help you're looking for this time.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    ynglsuresh is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Re: Progress Bar using Awt help

    Actual flow : i have a window which take the url and it will process the data and stores the data in to the DB.while processing am showing the progressbar in to that window ..the progress bar will show 1000 ms only(example code has written above thread).and the problem is some time process is taking more than 1000 ms .that time progress bar is completed and background still process is going on..

    Expected flow : i want to show the progress bar till process ends.

    hope it will understand :-) please help me on this guys

Similar Threads

  1. Replies: 0
    Last Post: 03-01-2012, 12:21 PM
  2. Progress bar
    By Milanek in forum New To Java
    Replies: 0
    Last Post: 10-11-2011, 04:41 PM
  3. problem on progress bar
    By ravidasineni in forum AWT / Swing
    Replies: 2
    Last Post: 12-27-2009, 02:23 AM
  4. How to use Progress bar
    By LankanSniper in forum AWT / Swing
    Replies: 3
    Last Post: 03-25-2009, 10:44 AM
  5. Console Progress Bar
    By new_2_java in forum New To Java
    Replies: 1
    Last Post: 02-16-2008, 02:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •