From 8ad232decd5c1c7f2ddb8e8e99e06e806db852e7 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 14 May 2017 17:34:01 +0200 Subject: [PATCH] Added comments about how the getSystemLookAndFeelClassName on linux will cause GTK2 to be loaded (can conflict with GTK3) --- src/dorkbox/util/SwingUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/util/SwingUtil.java b/src/dorkbox/util/SwingUtil.java index 5b00aab..4c75082 100644 --- a/src/dorkbox/util/SwingUtil.java +++ b/src/dorkbox/util/SwingUtil.java @@ -76,7 +76,10 @@ class SwingUtil { /** * Sets the entire L&F based on "simple" name. Null to set to the system L&F. If this is not called (or set), Swing will use the - * default CrossPlatform L&F, which is 'Metal' + * default CrossPlatform L&F, which is 'Metal'. + * + * NOTE: if null (which is the 'getSystemLookAndFeelClassName') and on Linux, this will cause GTK2 to get loaded first, which + * will cause conflicts if one tries to use GTK3 * * @param lookAndFeel the simple name or null for the system default */ @@ -84,6 +87,7 @@ class SwingUtil { void setLookAndFeel(final String lookAndFeel) { if (lookAndFeel == null) { try { + // NOTE: On Linux + swing, this will cause GTK2 to get loaded, which will cause conflicts if one tries to ALSO use GTK3 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace();