tags:

views:

1116

answers:

1

I have a shell that contains a canvas, which in turn draws some text in its PaintListener. The problem is, when I dynamically reduce size of the shell with its setBounds method (this is going to happen every once in a while), the text doesn't get redrawn. In fact, the canvas' PaintListener doesn't get called again.

Is there a way to force repaint? I've tried calling canvas.redraw() but this does not work.

A: 

Hmm, it appears that I did not set a layout on the shell. After setting a FillLayout, it works.

Dario
you should accept your answer as the correct one (by pressing on the green tick) so that users will see it has been answered
Savvas Dalkitsis