🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1569

Re: SwingUtilities invokeLater

#1569
From: Tad Frysinger
Date: Mon, 13 Oct 2003 15:06
27 lines
2405 bytes
It is very different (depending on which JDK version, which Linux 
version), but you should definitely NOT change your code to leave it up 
to the OS in this situation. You just may have not hit the contention in 
Linux yet, and in any event can't depend on that behavior being 
consistent from release to release. Using SwingUtilities insures that 
you won't have a problem by making the single AWT thread responsible for 
updating all the UI, regardless from which thread the original UI 
request came from.

In terms of resources, there is an interesting section in the "Taming 
Java Threads" book by Holub (or go to 
http://www.holub.com/publications/articles/index.html for lots of 
interesting stuff by this guy) on differences in threading between 
Windows and *nix (primarily Solaris, but the issues apply).

Tad Frysinger
[TeamB]

Aleksandar Pecanov wrote:
> I remember that while working on Windows, when I wanted to run a separate
> thread to aupdate a swing component (for example a memory indicator), I
> had run the thread with SwingUtilities.invokeLater(). However, while
> working under Linux, I forgot to use it. The component worked fine. Is
> the implementation of threads and thread synchronization in Java different
> on Windows and Linux. If so, where can I find more information about what
> should I pay attention when developing multiplatform Java Application?
> 
Technical Details
Message-ID: <3F8ABF88.4000807@earthlink.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <pan.2003.10.09.00.19.45.9367@mt.net.mk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,5cfd93ea3d2790a7
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-10-13 08:11:03 PST
Message-ID: <3F8ABF88.4000807@earthlink.net>
Date: Mon, 13 Oct 2003 09:06:48 -0600
From: Tad Frysinger <tfrysinger@earthlink.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: SwingUtilities invokeLater
References: <pan.2003.10.09.00.19.45.9367@mt.net.mk>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 206.61.185.113
X-Trace: newsgroups.borland.com 1066057617 206.61.185.113 (13 Oct 2003 08:06:57 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail