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 65919 - [50cat] NPE chenging layout manager
Summary: [50cat] NPE chenging layout manager
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 00:58 UTC by schwarcz
Modified: 2005-10-05 10:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (174.58 KB, text/plain)
2005-10-05 00:59 UTC, schwarcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schwarcz 2005-10-05 00:58:11 UTC
[ JDK VERSION : 1.5.0_04 ]

tried to change the layout in the Inspector.  Got an NPE before I could specify the new layout.
Comment 1 schwarcz 2005-10-05 00:59:35 UTC
Created attachment 25531 [details]
IDE log
Comment 2 schwarcz 2005-10-05 01:00:01 UTC
ava.lang.NullPointerException
	at
org.netbeans.modules.form.layoutdesign.LayoutModel.createModel(LayoutModel.java:405)
	at
org.netbeans.modules.form.actions.SelectLayoutAction$LayoutActionListener.actionPerformed(SelectLayoutAction.java:228)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
Comment 3 Jan Stola 2005-10-05 10:00:34 UTC
The NPE has been fixed:

/cvs/form/src/org/netbeans/modules/form/actions/SelectLayoutAction.java,v
new revision: 1.44; previous revision: 1.43
/cvs/form/src/org/netbeans/modules/form/layoutdesign/LayoutModel.java,v
new revision: 1.19; previous revision: 1.18

The exception was caused by an attempt to convert some container (in Other
components) to Free Design. Note that this conversion is very simple and
just attempts to keep visual position of components. Therefore it doesn't
have much sense to convert such container because it doesn't have its
components laid out.