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


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

Re: Refresh screen by rep

From "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Subject Re: Refresh screen by rep
Message-ID <NOednfNdOvTTkO3anZ2dnUVZ_hCdnZ2d@comcast.com> (permalink)
Newsgroups comp.lang.java.gui
References <ff4b308d-f1d1-40ce-9718-76cc884d2232@x29g2000prg.googlegroups.co
Date 2011-04-27 15:41 +0000
Organization TDS.net

Show all headers | 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