Article View: borland.public.jbuilder.java.language
Article #7426Re: Fun with threads
From: Sean Capstick
Date: Fri, 22 Jun 2001 15:17
Date: Fri, 22 Jun 2001 15:17
27 lines
1561 bytes
1561 bytes
Thanks, that works. I had to change parent to null though since the
thread doesn't have that info.
Sean
Torsten Welches <torsten.welches@who.cares.netcologne.de> wrote in message
news:3b32da2d$1_1@dnews...
>
> "Sean Capstick" <nospam.scapstick@dimensions.ca> wrote:
>
> >When the processing is finished, I want to signal the main
> >thread which will pop up an 'All done' message box and then
> >terminate.
>
> at the end of your background thread:
>
> .. file://loads of stuff
> Runnable terminator = new Runnable() {
> public void run() {
> JOptionPane.showMessageDialog(parent, "All done");
> System.exit(0);
> }
> };
> SwingUtilities.invokeLater(terminator);
>
> Torsten
>
Technical Details
Message-ID:
<3b336099$2_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3b320ce8_1@dnews> <3b32da2d$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,2fd1c7b03719c733 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-22 08:18:35 PST From: "Sean Capstick" <nospam.scapstick@dimensions.ca> Newsgroups: borland.public.jbuilder.java.language References: <3b320ce8_1@dnews> <3b32da2d$1_1@dnews> Subject: Re: Fun with threads Date: Fri, 22 Jun 2001 11:17:39 -0400 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 207.139.208.137 Message-ID: <3b336099$2_2@dnews> X-Trace: dnews 993222809 207.139.208.137 (22 Jun 2001 08:13:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews