equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
31 import javax.swing.JLabel; |
31 import javax.swing.JLabel; |
32 import javax.swing.SwingUtilities; |
32 import javax.swing.SwingUtilities; |
33 import javax.swing.UIManager; |
33 import javax.swing.UIManager; |
34 import javax.swing.UIDefaults; |
34 import javax.swing.UIDefaults; |
35 import javax.swing.UIManager.LookAndFeelInfo; |
35 import javax.swing.UIManager.LookAndFeelInfo; |
|
36 import javax.swing.UnsupportedLookAndFeelException; |
36 import javax.swing.plaf.basic.BasicLookAndFeel; |
37 import javax.swing.plaf.basic.BasicLookAndFeel; |
37 import static java.awt.RenderingHints.KEY_TEXT_ANTIALIASING; |
38 import static java.awt.RenderingHints.KEY_TEXT_ANTIALIASING; |
38 import static java.awt.RenderingHints.KEY_TEXT_LCD_CONTRAST; |
39 import static java.awt.RenderingHints.KEY_TEXT_LCD_CONTRAST; |
39 import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_GASP; |
40 import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_GASP; |
40 import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR; |
41 import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR; |
176 } |
177 } |
177 |
178 |
178 private static void setLookAndFeel(String lafClass) { |
179 private static void setLookAndFeel(String lafClass) { |
179 try { |
180 try { |
180 UIManager.setLookAndFeel(lafClass); |
181 UIManager.setLookAndFeel(lafClass); |
|
182 } catch (final UnsupportedLookAndFeelException ignored) { |
181 } catch (Exception e) { |
183 } catch (Exception e) { |
182 throw new RuntimeException(e); |
184 throw new RuntimeException(e); |
183 } |
185 } |
184 } |
186 } |
185 |
187 |