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" Subject: Re: Refresh screen by rep Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: 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: --- * 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