Current operating systems (e.g. Windows, macOS) let the user decide if they want dark content on light blackground (classic) or rather light content on dark blackground (dark mode).
Is there something available in Java, so that my (client side) Java programs can automatically adjust their contrast polarity according to that OS user setting? I am using Swing, if that matters.
I found the system property apple.awt.application.appearance, but nothing for Windows and nothing operating system independent.
And also, is there a listener? Because that setting might change on runtime.
Motivation: inverse contrast polarity seems to inhibit myopia (Aleman et al. 2018-07-18 Science)