Applet Not Repainting Component

Hi;

I think I have some trouble with my applet painting correctly.

It uses a home made TextArea, which works fine when the applet is run as an application. However, when the applet is run as an applet in a browser the TextArea does not get repainted well or at with scrolling.

When I minimize and maximize the browser the appropriate text is displayed in the applet.

My home made TextArea is a Panel object with a ScrollPane that wraps a Canvas. The Canvas is where all the painting logic is .

Do I need to tell my applet to repaint after every scrolling operation. If so, how and where.

Thanks in advance

Steve
[678 byte] By [Steve Russell] at [2007-11-15 19:14:55]
# 1 Re: Applet Not Repainting Component
did you use the validate() method after each update on the Canvas ?
try this (may be ...) :

yourCanvas.setSize(this.getPreferredSize());
yourCanvas.validate();
yourScrollPane.doLayout();

Paul-Emile Veuve
at 2007-11-10 3:01:29 >