flickering of image

I have designed an applet with 4 panels added to the

main panel which is added to the applet.

I have added gif image to one panel. Whenever I click

a button in other panels, the image gets flicker which

awkwardly appears in the centre of applet for millisecond.

Is there anyway to avoid it ?

[337 byte] By [sradhakrishnans] at [2007-9-26 2:44:56]
# 1
try using of JLabel on your JPanel, or use yourJPanel.setDoubleBuffered(true);i hope this will help.
eaq6 at 2007-6-29 10:25:57 > top of Java-index,Archived Forums,Java Programming...
# 2
HiWhat I think u ought to do is to override update() so that it doesnt clear the screen between paintings.public void update(Graphics g){paint(g);} and use an offscreenImage to draw on the screen.
jayantis at 2007-6-29 10:25:57 > top of Java-index,Archived Forums,Java Programming...