Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2911

Re: Refresh screen by rep

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Subject Re: Refresh screen by rep
Message-ID <NOednfNdOvTTkO3anZ2dnUVZ_hCdnZ2d@comcast.com> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <ff4b308d-f1d1-40ce-9718-76cc884d2232@x29g2000prg.googlegroups.co
References <ff4b308d-f1d1-40ce-9718-76cc884d2232@x29g2000prg.googlegroups.co
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 30
Date Wed, 27 Apr 2011 15:41:51 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918911 96.60.20.240 (Wed, 27 Apr 2011 10:41:51 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:41:51 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2911

Show key headers only | View raw


  To: comp.lang.java.gui
liang.spark@gmail.com wrote:
> Hi here,
> 
> In my cast.
> class MyFrame extends JFrame{
>   public void paint(Graphics g){
>     g.drawText("some word");
>   }
> }
> Every time I call repaint() mothed. the application screen twinkled.
> If i call repaint() frequently. the screen continuously fresh. It's
> serious problem for user experience.
> how can I avoid this problem?
> 
> I appreciate to any suggestion!
> 
> liang xiao
Don't override paint.
Create your own subclass of JComponent, and override paintComponent.

You're flashing should go away.

-- 
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread


Thread

Re: Refresh screen by rep "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000

csiph-web