Initialize the Look & Feel if it hasn't been already. Call this before using any Swing-related code in PApplet methods.
()
| 915 | * Call this before using any Swing-related code in PApplet methods. |
| 916 | */ |
| 917 | static private void checkLookAndFeel() { |
| 918 | if (!lookAndFeelCheck) { |
| 919 | if (PApplet.platform == PConstants.WINDOWS) { |
| 920 | // Windows is defaulting to Metal or something else awful. |
| 921 | // Which also is not scaled properly with HiDPI interfaces. |
| 922 | try { |
| 923 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
| 924 | } catch (Exception ignored) { } |
| 925 | } |
| 926 | lookAndFeelCheck = true; |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | |
| 931 | // TODO maybe call this with reflection from inside PApplet? |
no test coverage detected