mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-18 10:24:30 +08:00
UIManager.java: Make the UIManager respect the swing.defaultlaf system property.
2005-04-19 Roman Kennke <roman@kennke.org> * javax/swing/UIManager.java: Make the UIManager respect the swing.defaultlaf system property. From-SVN: r98389
This commit is contained in:
parent
8fe0225bf8
commit
4821f3090c
@ -1,3 +1,9 @@
|
||||
2005-04-19 Roman Kennke <roman@kennke.org>
|
||||
|
||||
* javax/swing/UIManager.java:
|
||||
Make the UIManager respect the swing.defaultlaf system
|
||||
property.
|
||||
|
||||
2005-04-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/lang/natVMClassLoader.cc (loadClass): Call resolveClass,
|
||||
|
@ -83,7 +83,26 @@ public class UIManager implements Serializable
|
||||
static LookAndFeel[] aux_installed;
|
||||
|
||||
static LookAndFeel look_and_feel = new MetalLookAndFeel();
|
||||
|
||||
|
||||
static
|
||||
{
|
||||
String defaultlaf = System.getProperty("swing.defaultlaf");
|
||||
try {
|
||||
if (defaultlaf != null)
|
||||
{
|
||||
Class lafClass = Class.forName(defaultlaf);
|
||||
LookAndFeel laf = (LookAndFeel) lafClass.newInstance();
|
||||
setLookAndFeel(laf);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.err.println("cannot initialize Look and Feel: " + defaultlaf);
|
||||
System.err.println("errot: " + ex.getMessage());
|
||||
System.err.println("falling back to Metal Look and Feel");
|
||||
}
|
||||
}
|
||||
|
||||
public UIManager()
|
||||
{
|
||||
// Do nothing here.
|
||||
|
Loading…
Reference in New Issue
Block a user