fixed painting of applet