Article View: borland.public.jbuilder.java.swing
Article #7998Re: Problems with refreshing teh Screens using SWING
From: Joi Ellis [TeamB]
Date: Mon, 06 Nov 2000 00:00
Date: Mon, 06 Nov 2000 00:00
27 lines
1796 bytes
1796 bytes
Nitesh Arora <nitesh.arora@patni.com> wrote: > HI... > Thanx a lot for ur suggestion but teh applicatio we have developed doesn't > use a new thred for printing. What it does is , as soon as the the print > buttonis clicked, an object of a PRINT pRIVIEW class(created by us) is > instantiated which issimilar to the normal windows printing screen. Could > you plz elabborate on the concept u r talking about. Is there some way of > optimizing SWING code for better and speedy performance. Right. Because your app doesn't use a thread for its printing, the repainting performance is affected. The JVM itself uses multiple threads and one of those threads handles painting, but that same thread also handles events. If you fire an event which then triggers some long-lived process, and don't take steps to get that process into its own thread, then everything else in that thread's workload will be delayed, including SWING's ability to paint the screen. Here's a link to sun's threads tutorial: http://java.sun.com/docs/books/tutorial/essential/threads/definition.html -- Joi Ellis (TeamB) No direct email, please. For best results, post on news server newsgroups.borland.com!
Technical Details
Message-ID:
<8u5bei$6ig4@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3a03cc65_1@dnews> <8u1ku3$ju7@bornews.borland.com> <3a062a67_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c81aa637807908b9
X-Google-Attributes: gid111d45,public
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: Problems with refreshing teh Screens using SWING
Date: 2000/11/06
Message-ID: <8u5bei$6ig4@bornews.borland.com>
X-Deja-AN: 690145811
References: <3a03cc65_1@dnews> <8u1ku3$ju7@bornews.borland.com> <3a062a67_1@dnews>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.swing