Hi,

Lillians patch from some days ago triggered an NPE here. Now that
Components do not have a default font anymore, some font defaults have to
be added to the Swing L&Fs. Here comes the default for
FormattedTextField.font.

2005-09-24  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicLookAndFeel.java
        (initComponentDefaults): Added font default for
        FormattedTextField.font. Solves an NPE that was caused by a null
        font on a JFormattedTextField.

/Roman
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.58
diff -u -r1.58 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java	23 Sep 2005 16:04:05 -0000	1.58
+++ javax/swing/plaf/basic/BasicLookAndFeel.java	24 Sep 2005 20:32:26 -0000
@@ -467,6 +467,8 @@
       "FocusManagerClassName", "TODO",
       "FormattedTextField.background", new ColorUIResource(light),
       "FormattedTextField.caretForeground", new ColorUIResource(Color.black),
+      "FormattedTextField.font",
+      new FontUIResource("SansSerif", Font.PLAIN, 12),
       "FormattedTextField.foreground", new ColorUIResource(Color.black),
       "FormattedTextField.inactiveBackground", new ColorUIResource(light),
       "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray),
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to