πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11073

Re: Beginner question: how can I get a ProgressBar to refresh ?

#11073
From: Yannick.Bollati
Date: Tue, 13 Jul 1999 00:00
37 lines
1537 bytes
Hakan UNLU a οΏ½crit dans le message <7mg3i1$tm16@forums.borland.com>...
>Usually valide refreshes a component. Try using
>
>progressBar.validate()
>
>(I did not check if progressbar has a validate method but it should have)
>
>--
>Hakan UNLU


No, this does not seems to work. I have changed my code like this... with
the same results.

public void run(Frame motherframe)
  {
      DisplayProgressDialog dpd = new
      DisplayProgressDialog(motherframe,"things are going on...",false);
      dpd.jProgressBar1.setMinimum(0);
      dpd.jProgressBar1.setMaximum(10);
      dpd.show();
      float p=0;
      for(int i=1;i<=10;i++)
      {
        dpd.jProgressBar1.setValue(i);

          // just try to call .validate() on everything....
        motherframe.validate();
        dpd.validate();
        dpd.jProgressBar1.validate();

        for(int j=0;j<10000;j++)
        {
            p=p* 1 / ((float) j);
         }
      }
  }
Technical Details
Message-ID: <7mg7fi$t615@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7mg1po$t311@forums.borland.com> <7mg3i1$tm16@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,3a34dcd158442895
X-Google-Attributes: gid111d45,public
From: "Yannick.Bollati" <Yannick.Bollati@wanadoo.fr>
Subject: Re: Beginner question: how can I get a ProgressBar to refresh ?
Date: 1999/07/13
Message-ID: <7mg7fi$t615@forums.borland.com>
X-Deja-AN: 500649978
References: <7mg1po$t311@forums.borland.com> <7mg3i1$tm16@forums.borland.com>
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Newsgroups: borland.public.jbuilder.java.swing