T
tratrillo
sorry for the probably dumb question,
but I'm new to java: I have a small example
that draws a rect in a paint method of
the canvas.
based on an event I redraw the rect with a
different color (with a call to fillRect).
The problem is that if I put the window in
background and then get it in forground, I
see the change, otherwise nothing appens!
Seem I'm missing a update call.
By the way, if I call the sequence
canvas.setVisible(false);
canvas.setVisible(true);
it works, but I do not want to redraw all the
canvas, just the rect, to avoid flickering.
thanks
G.
but I'm new to java: I have a small example
that draws a rect in a paint method of
the canvas.
based on an event I redraw the rect with a
different color (with a call to fillRect).
The problem is that if I put the window in
background and then get it in forground, I
see the change, otherwise nothing appens!
Seem I'm missing a update call.
By the way, if I call the sequence
canvas.setVisible(false);
canvas.setVisible(true);
it works, but I do not want to redraw all the
canvas, just the rect, to avoid flickering.
thanks
G.