And this is an expected behaviour. Check below documentation from API:
public final void repaint()
Requests a repaint for the entire Canvas. The effect is identical to
repaint(0, 0, getWidth(), getHeight());
If you want to always update the whole display when calling repaint() add the following method to your class:
public void repaint() {
super.repaint(0, 0, super.getWidth(), super.getHeight());
}
No comments:
Post a Comment