I am having a problem involving repaint with no success as yet in tracking down 
the cause. Perhaps someone can suggest something that would help me make some 
progress.

The symptom is that some portion of a repaint operation is delayed until the 
next repaint. In other words, I make a change to the data, which should be 
reflected in a change to the display, but the display is only partially 
updated. The next time a repaint is triggered, for example, when the window is 
deactivated (this is macOS), the remaining display updates appear. I have added 
print statements to my paint method that indicate that the paint methods are 
being called at the expected time. It is as if there are painting operations 
that are being queued, but the queue is not flushed until the next repaint.

I have noticed this problem only in a particular window of my application. I 
have tried stripping out various portions of the window to see if one of the 
components might be causing the problem, but the results are inconclusive and 
inconsistent. It may be that the problem is related to the number of components 
being updated, rather than a problem with a particular component.

I have observed this problem on JDK 8. Just now I tried running the app on JDK 
9, and I have yet to observe the problem. Was a bug fixed in 9 but not 
backported that might explain this behavior?

My display is a HiDPI display, in case that matters.

  Alan

Reply via email to