🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7420

Re: Fun with threads

#7420
From: Torsten Welches
Date: Fri, 22 Jun 2001 05:39
19 lines
1367 bytes
"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:

.. //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: <3b32da2d$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b320ce8_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-21 23:08:55 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Subject: Re: Fun with threads
Newsgroups: borland.public.jbuilder.java.language
X-User-Info: 193.158.55.74 193.158.55.74    
References:  <3b320ce8_1@dnews> 
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3b32da2d$1_1@dnews>
Date: 21 Jun 2001 22:39:57 -0700
X-Trace: dnews 993188397 207.105.83.65 (21 Jun 2001 22:39:57 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews