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


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

Re: Refresh screen by rep

Started by"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
First post2011-04-27 15:41 +0000
Last post2011-04-27 15:41 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#2911 — Re: Refresh screen by rep

From"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
SubjectRe: Refresh screen by rep
Message-ID<NOednfNdOvTTkO3anZ2dnUVZ_hCdnZ2d@comcast.com>
  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

[toc] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web