java change swing look and feel to system ui

Solutions on MaxInterview for java change swing look and feel to system ui by the best coders in the world

showing results for - "java change swing look and feel to system ui"
Jorge
09 Oct 2019
1public static void main(String[] args) {
2    try {
3            // Set System L&F
4        UIManager.setLookAndFeel(
5            UIManager.getSystemLookAndFeelClassName());
6    } 
7    catch (UnsupportedLookAndFeelException e) {
8       // handle exception
9    }
10    catch (ClassNotFoundException e) {
11       // handle exception
12    }
13    catch (InstantiationException e) {
14       // handle exception
15    }
16    catch (IllegalAccessException e) {
17       // handle exception
18    }
19
20    new SwingApplication(); //Create and show the GUI.
21}
22