• Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet delays repaint/update when browser loses focus

 
Tom McComb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning java gurus.
I have a little problem with an applet I coded. It is a navigation applet, loaded in one frame, that uses liveconnect to determine the content of another frame.
Everything works fine until I load the frameset into Netscape 4.7, then open another instance of the browser. Somehow, once the second instance is open, the first applet does not repaint. In other words, when I return focus to the first browser, the applet is blank white; devoid of any navigation elements.
When I minimize that first browser, then restore it again, the applet repaints.
Why is there this kind of lag/delay and how can I "force" a repaint without affecting performance too badly?
Thanks in advance for your help.
------------------
Tom McComb
 
Yoo-Jin Lee
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got the following from: http://java.sun.com/products/jdk/1.1/docs/tooldocs/solaris/javap.html
<quote>(Sect. 10) When I call repaint() repeatedly, half my requests get lost and don't appear on the screen. Why is this?
repaint() just tells the AWT that you'd like a paint to happen. AWT will fold several adjacent repaint requests into one, so that only the most current paint is done. One possible workaround might be to use a clip rectangle and only paint the different areas that have changed. </quote>
Hope this helps.
-Yoo-Jin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!