On Tue, 2006-12-05 at 10:47 +0100, Roman Kennke wrote: > Am Montag, den 04.12.2006, 19:21 -0500 schrieb Thomas Fitzsimmons: > > This patch makes Component.getFont always return a non-null Font. This > > fixes a > > NullPointerException thrown by MegaMek. I committed this fix to trunk and > > classpath-0_93-branch. > > Hmm. While this makes the method more safe, I don't think that's 100% > correct. When a component has no parent or doesn't get a font from a > parent it indeed returns null. The WindowPeer seems to be responsible > for setting a font on the toplevel window AFAICS.
It also fixed an issue for me with jedit (it makes the Plugins -> Plugins Options menu and dialog work for, so you can actually set the font for the QuickNotepad). If we cannot come up with something better I would like to ship with this patch. But it is not ideal, seeing that it did introduce mauve regressions for: FAIL: java.awt.Component.getFont FAIL: javax.swing.JComponent.getFont FAIL: javax.swing.JLabel.constructor FAIL: javax.swing.plaf.basic.BasicComboBoxUI.createRenderer FAIL: javax.swing.plaf.metal.MetalComboBoxUI.getMinimumSize FAIL: javax.swing.plaf.metal.MetalComboBoxUI.getPreferredSize It did also provide a new PASS however: PASS: javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFont Cheers, Mark
signature.asc
Description: This is a digitally signed message part