Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet flicker upon netscape wndw resize

 
Steve Johnson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What causes an applet to flicker when the Netscape window
which contains the applet is resized ?
I don't think we are mixing any heavyweight and lightweight components.
We are using a JApplet with JDK 1.2 on Windows 95/NT.
 
paul wheaton
Trailboss
Pie
Posts: 21896
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flicker during the resize or after the resize?
During makes sense: the applet repaint() is called repeatedly because the image may have been obscured.
 
sai
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use this method to avoid flickering
public void update(Graphics g)
{
paint(g);
}
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i found that i was using a lot of System.out.println(""); statements in my paint method as such this was slowing things down. The rule i found is
"NEVER HAVE system.out.println() STATEMENTS IN U R PAINT CODE".
another rule i follow is first undertake repaint() and then do the processing of the data.
for example if i have to display "abc" on the applet. i first display "abc" by calling repaint in another method and then save the data rather than saving the data first and then repainting.
Rahul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic