问题
Users of our application have been experiencing problems with their Swing GUIs not drawing correctly.
The common link between all users with problems is that they've recently applied a Windows update. Users have reported that dialogs draw correctly on some monitors but not on others.
An example of the kind of problems we're seeing*:
Users also report dialogs which only show a frame, and are otherwise transparent. Effectively the same kind of problems you'd see if the UI thread were blocked.
What could be the problem?
*I can't post screenshots of our actual application as it contains sensitive information
回答1:
Update: This issue has been fixed in update KB4039884.
This seems to be a reasonably wide-spread issue caused by a recent patch. It's not limited to Java:
It seems, that Microsoft’s Update KB4034664 (and KB4034679) for Windows 7 and Windows Server is causing display issues with several applications on a second screen.
Reported by Born City, Computer World, and Microsoft themselves:
If a machine has more than one monitor connected and the screen numbering is not in sequence, some applications will experience rendering issues.
You should be able to solve the problem by rolling back the patch. It is a security update (links above detail what is included), so if you're particularly risk-averse you may not want to do this.
Microsoft lists the workaround as:
- Enable Desktop Composition (needs graphics card support).
- Make sure that the main monitor is on the top left in the monitor layout.
You could also try switching to a single monitor setup, or making other changes to your monitor configuration (Control Panel > Display > Change display settings). Some reports speculate that which monitor is set as your 'main display' may make a difference.
You might also want to try the following flag: -Dsun.noddraw=true
来源:https://stackoverflow.com/questions/45710630/display-issues-on-multiple-screens-after-windows-7-update-kb4034664-august-2017