Added comments about how the getSystemLookAndFeelClassName on linux will
cause GTK2 to be loaded (can conflict with GTK3)
This commit is contained in:
parent
bec29c4cd3
commit
8ad232decd
@ -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
|
* 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
|
* @param lookAndFeel the simple name or null for the system default
|
||||||
*/
|
*/
|
||||||
@ -84,6 +87,7 @@ class SwingUtil {
|
|||||||
void setLookAndFeel(final String lookAndFeel) {
|
void setLookAndFeel(final String lookAndFeel) {
|
||||||
if (lookAndFeel == null) {
|
if (lookAndFeel == null) {
|
||||||
try {
|
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());
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user