🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1367

refreshing controls

#1367
From: Norbert Staiger
Date: Mon, 04 Feb 2002 11:37
15 lines
1479 bytes
I have a label on a JFrame and a button.
The listener for the button is

    for (int i = 0; i < 10; i++) {
      label.setText(i+"");
      label.validate();
      label.repaint();
      try {
        Thread.sleep(100);
      }
      catch (InterruptedException ex) {
      }
    }

    Why is the value of the label not refreshed (only at the end) ???
Technical Details
Message-ID: <a3lrp7$nav$1@stu1id2.ip.tesion.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!212.43.194.69!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,b1e524f4ebb2d1a7,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-02-04 03:37:18 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!212.43.194.69!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!not-for-mail
From: "Norbert Staiger" <nobert.staiger@kvsb.de>
Newsgroups: borland.public.jbuilder.java.api
Subject: refreshing controls
Date: Mon, 4 Feb 2002 12:37:08 +0100
Organization: keine Angabe
Lines: 20
Message-ID: <a3lrp7$nav$1@stu1id2.ip.tesion.net>
Reply-To: "Norbert Staiger" <nobert.staiger@kvsb.de>
NNTP-Posting-Host: mail.kvsb.de
X-Trace: stu1id2.ip.tesion.net 1012822631 23903 213.30.253.234 (4 Feb 2002 11:37:11 GMT)
X-Complaints-To: newsmaster@tesion.net
NNTP-Posting-Date: 4 Feb 2002 11:37:11 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200