146 |
LookAndFeel laf = (LookAndFeel) lafClass.newInstance(); |
LookAndFeel laf = (LookAndFeel) lafClass.newInstance(); |
147 |
setLookAndFeel(laf); |
setLookAndFeel(laf); |
148 |
} |
} |
149 |
|
else |
150 |
|
{ |
151 |
|
setLookAndFeel(new MetalLookAndFeel()); |
152 |
|
} |
153 |
} |
} |
154 |
catch (Exception ex) |
catch (Exception ex) |
155 |
{ |
{ |
156 |
System.err.println("cannot initialize Look and Feel: " + defaultlaf); |
System.err.println("cannot initialize Look and Feel: " + defaultlaf); |
157 |
System.err.println("error: " + ex.getMessage()); |
System.err.println("error: " + ex.getMessage()); |
158 |
System.err.println("falling back to Metal Look and Feel"); |
System.err.println("falling back to Metal Look and Feel"); |
159 |
|
try |
160 |
|
{ |
161 |
|
setLookAndFeel(new MetalLookAndFeel()); |
162 |
|
} |
163 |
|
catch (Exception ex2) |
164 |
|
{ |
165 |
|
throw (Error) new AssertionError("There must be no problem installing" |
166 |
|
+ " the MetalLookAndFeel.") |
167 |
|
.initCause(ex2); |
168 |
|
} |
169 |
} |
} |
|
currentLookAndFeel = new MetalLookAndFeel(); |
|
|
currentLookAndFeel.initialize(); |
|
|
currentUIDefaults = currentLookAndFeel.getDefaults(); |
|
|
|
|
170 |
} |
} |
171 |
|
|
172 |
/** |
/** |
173 |
* Creates a new instance of the <code>UIManager</code>. There is no need |
* Creates a new instance of the <code>UIManager</code>. There is no need |
174 |
* to construct an instance of this class, since all methods are static. |
* to construct an instance of this class, since all methods are static. |