Article View: borland.public.jbuilder.java.api
Article #784Re: Alternatives to Threading?
From: Owen Green
Date: Tue, 22 Oct 2002 15:39
Date: Tue, 22 Oct 2002 15:39
28 lines
1871 bytes
1871 bytes
"Bob Rodehorst" <rrodehorst@seacorp.com> wrote in message news:3DB56599.6050703@seacorp.com... > I've got a bit of a unique situation here, so bear with me... > > I have a screen which queries a database using JDBC/ODBC drivers. Since > ODBC drivers are notoriously slow, it takes a while for this screen to > pop up while it's querying the DB <snip> > So, I tried putting the wait dialog in a separate thread, run using a <snip> > I've been told that it's not a good idea to put GUI actions inside of > separate threads. Is this true? If so, how should I handle this > situation? Any help would be greatly appreciated. Thanks! > Why not put the DB access in a seperate thread? FYI, doing GUI stuff outside of the event dispatch thread means you need to use either SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater(). hth Owen
Technical Details
Message-ID:
<3db57143$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!teaser.fr!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3DB56599.6050703@seacorp.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,4258492bf8c00acc,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-10-22 09:03:16 PST From: "Owen Green" <owen@begonefoulmachine.kennulz.demon.co.uk> Newsgroups: borland.public.jbuilder.java.api References: <3DB56599.6050703@seacorp.com> Subject: Re: Alternatives to Threading? Date: Tue, 22 Oct 2002 16:39:50 +0100 Lines: 30 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 NNTP-Posting-Host: 62.253.133.165 Message-ID: <3db57143$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1035301187 62.253.133.165 (22 Oct 2002 08:39:47 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!teaser.fr!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail