* javax/swing/UIManager.java:
Make the UIManager respect the swing.defaultlaf system
property.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98389
138bc75d-0d04-0410-961f-
82ee72b054a4
+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,
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.