Article View: borland.public.jbuilder.java.swing
Article #355Updating a Swing GUI
From: anthony
Date: Fri, 02 Sep 2005 14:01
Date: Fri, 02 Sep 2005 14:01
16 lines
1684 bytes
1684 bytes
Hi, I need to write a swing front-end for a program that will read from a message queue, perform a calculation, then update the GUI. This process will be in a constant loop while the program is running. I assume that I should have a separate thread running that will read and process my messages from the queue. I am new to swing so I have a few questions. 1. When in the code should I spaw the new thread? 2. Since I'll be updating the GUI, do I need to use a timer, swingworker or something else. 3. How does the other thread comunicate with the GUI? Any help or examples are appreciated. AJS
Technical Details
Message-ID:
<1125669681.680310.236900@g44g2000cwa.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,5ce59f2c53c8ed46,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: anthony@station5.net Newsgroups: borland.public.jbuilder.java.swing Subject: Updating a Swing GUI Date: 2 Sep 2005 07:01:21 -0700 Organization: http://groups.google.com Lines: 17 Message-ID: <1125669681.680310.236900@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 153.2.246.30 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1125669687 30569 127.0.0.1 (2 Sep 2005 14:01:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 2 Sep 2005 14:01:27 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UPS-Corporate; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=153.2.246.30; posting-account=b9Lp6wwAAACDtnfwv1SpihKHfp7X2kmk