bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22861] [Swing] plaf uninstall should not try to remove UI


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22861] [Swing] plaf uninstall should not try to remove UI items
Date: 16 Oct 2005 01:27:29 -0000

I get a nullpointerexception in my class that extends JTable and implements
setFont() to do something with that font since the uninstall from the plaf does
a setFont(null).

Exception during event dispatch:
java.lang.NullPointerException
   at uic.widgets.UICTable.setFont (UICTable.java:253)
   at javax.swing.plaf.basic.BasicTableUI.uninstallDefaults
(BasicTableUI.java:212)
   at javax.swing.plaf.basic.BasicTableUI.uninstallUI (BasicTableUI.java:246)
   at javax.swing.JComponent.setUI (JComponent.java:2200)
   at javax.swing.JTable.setUI (JTable.java:1730)
   at javax.swing.JTable.updateUI (JTable.java:1735)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:614)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)
   at javax.swing.SwingUtilities.updateComponentTreeUI
(SwingUtilities.java:610)

All items that have UIResource equivalents (FontUIResource etc) should not be
set to 'null', but to sane defaults.
Or, in other words, the UI should have defaults (and know what to do with
'null' values), not the widget.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2005-06-03 
09:35 -------
I have checked in a fix for that. Could you please retest?


------- Comment #2 from from-classpath at savannah dot gnu dot org  2005-07-13 
17:15 -------
Works for me now. I'm closing this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22861





reply via email to

[Prev in Thread] Current Thread [Next in Thread]