This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 42867 - [GTK] NPE opening Fonts and Colors
Summary: [GTK] NPE opening Fonts and Colors
Status: CLOSED DUPLICATE of bug 41765
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: GTK
Depends on:
Blocks:
 
Reported: 2004-05-05 18:17 UTC by _ tboudreau
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2004-05-05 18:17:25 UTC
Just click the custom editor button to get the
exception below.  My guess is that the custom
editor overrides addPropertyChangeListener()
incorrectly (just delete the propertyChangeSupport
and let it use the inherited property change
listener support from JComponent).

If the PropertyEditor is a component subclass,
please split it into two - there's no reason to
run a GUI component constructor again and again
just to display "Fonts and Colors" in the property
sheet.

java.lang.NullPointerException
	at
org.netbeans.modules.editor.options.ColoringArrayEditorPanel.addPropertyChangeListener(ColoringArrayEditorPanel.java:184)
	at
javax.swing.plaf.synth.SynthPanelUI.installListeners(SynthPanelUI.java:49)
	at
javax.swing.plaf.synth.SynthPanelUI.installUI(SynthPanelUI.java:38)
	at javax.swing.JComponent.setUI(JComponent.java:650)
	at javax.swing.JPanel.setUI(JPanel.java:131)
	at javax.swing.JPanel.updateUI(JPanel.java:104)
	at javax.swing.JPanel.<init>(JPanel.java:64)
	at javax.swing.JPanel.<init>(JPanel.java:87)
	at javax.swing.JPanel.<init>(JPanel.java:95)
	at
org.netbeans.modules.editor.options.ColoringArrayEditorPanel.<init>(ColoringArrayEditorPanel.java:68)
	at
org.netbeans.modules.editor.options.ColoringArrayEditor.getCustomEditor(ColoringArrayEditor.java:52)
	at
org.openide.explorer.propertysheet.PropertyDialogManager.<init>(PropertyDialogManager.java:108)
	at
org.openide.explorer.propertysheet.CustomEditorAction.actionPerformed(CustomEditorAction.java:174)
	at
org.openide.explorer.propertysheet.SheetTable.editCellAt(SheetTable.java:781)
	at
javax.swing.plaf.basic.BasicTableUI$Handler.adjustFocusAndSelection(BasicTableUI.java:897)
	at
javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:864)
	at
java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
	at
java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
	at
java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
	at
java.awt.Component.processMouseEvent(Component.java:5462)
	at
javax.swing.JComponent.processMouseEvent(JComponent.java:3089)
	at
org.openide.explorer.propertysheet.SheetTable.processMouseEvent(SheetTable.java:582)
	at
java.awt.Component.processEvent(Component.java:5230)
	at
java.awt.Container.processEvent(Container.java:1961)
	at
java.awt.Component.dispatchEventImpl(Component.java:3933)
	at
java.awt.Container.dispatchEventImpl(Container.java:2019)
	at
java.awt.Component.dispatchEvent(Component.java:3781)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4203)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3880)
	at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
	at
java.awt.Container.dispatchEventImpl(Container.java:2005)
	at
java.awt.Window.dispatchEventImpl(Window.java:1764)
	at
java.awt.Component.dispatchEvent(Component.java:3781)
[catch] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Miloslav Metelka 2004-05-07 10:24:30 UTC
I have fixed the dup issue just few hours before you have entered this
one ;)

*** This issue has been marked as a duplicate of 41765 ***
Comment 2 Marian Mirilovic 2004-07-29 13:54:35 UTC
verified duplicate