🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JProgressBar how do you use it?

#10459
From: Shane Cooper
Date: Fri, 01 Oct 1999 00:00
26 lines
1354 bytes
Hi,
i am trying to use the jprogress bar to give status in downloading a file to
the comm port.I get the pane to show with the progress bar in it but it
doesnt update. the progressbar is contained in the progresspanel. here is
the block of code that i am using to for the progressbar.

        int max_count = (int)f.length();
        int count = 0;
        progressPanel1.jProgressBar1.setMaximum(max_count);
        progressPanel1.jProgressBar1.setMinimum(count);

        while((n = fis.available()) > 0) {
          int result = fis.read();
          if (result == -1) break;
          connection.serialDataOut((char)result);
          count++;
          progressPanel1.jProgressBar1.setValue(count);
        }
        fis.close();
        progressPanel1.setVisible(false);

Any help appreciated.

thanks

shane cooper
Technical Details
Message-ID: <7t1rde$5aa7@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,55ba8bc5b7bbc80a,start
X-Google-Attributes: gid111d45,public
From: "Shane Cooper" <sdcooper@ozemail.com.au>
Subject: JProgressBar how do you use it?
Date: 1999/10/01
Message-ID: <7t1rde$5aa7@forums.borland.com>
X-Deja-AN: 531464844
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing