update() will always be called but it will not always cause paintEvent to be executed.