On Windows, fix graphics bugs after external monitor connect/disconnect
On Windows 10 and 11, I have observed various graphics bugs that appear after changes in the OS graphics configuration, such as connecting or disconnecting external monitors, or changing the HiDPI scaling levels. In some cases, the NetBeans main window ceased to update its graphics at all, making the IDE completely unusable until restarted, or until "Full Screen" was toggled via keyboard shortcut. In other cases, the NetBeans window might appear off-screen or partially off-screen, or the NetBeans window might have paint errors until it is maximized/restored. These are probably OpenJDK bugs or even bugs in Windows graphics drivers, as I saw similar problems in jEdit (another Java Swing app) and Skype (not a Java app).
I ended up developing the patch in this PR, which detects changes in the graphics environment on Windows and refreshes the main window in a way that resets the window state in these cases. This patch was developed and verified to work through many months of experimentation, and I have now been running it on my working NetBeans IDE for 18 months.