swing: possible workaround for unfixed bug in openjdk on linux

never reported because I wasn't able to reproduce it with a simpler program (I spent hours!)
quite similar to JDK-8001463, but with multiple monitors enabled