Initialize the Look & Feel if it hasn't been already. Call this before using any Swing-related code in PApplet methods.
()
| 6464 | * Call this before using any Swing-related code in PApplet methods. |
| 6465 | */ |
| 6466 | static private void checkLookAndFeel() { |
| 6467 | if (!lookAndFeelCheck) { |
| 6468 | if (platform == WINDOWS) { |
| 6469 | // Windows is defaulting to Metal or something else awful. |
| 6470 | // Which also is not scaled properly with HiDPI interfaces. |
| 6471 | try { |
| 6472 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
| 6473 | } catch (Exception e) { } |
| 6474 | } |
| 6475 | lookAndFeelCheck = true; |
| 6476 | } |
| 6477 | } |
| 6478 | |
| 6479 | /** |
| 6480 | * Open a platform-specific file chooser dialog to select a file for input. |