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 75271 - GridBagConstraints.clone(GridBagConstraints.java:499) - insets null
Summary: GridBagConstraints.clone(GridBagConstraints.java:499) - insets null
Status: RESOLVED WORKSFORME
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 5.x
Hardware: Sun Linux
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 10:18 UTC by jenikya
Modified: 2006-09-19 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 jenikya 2006-04-20 10:18:04 UTC
I've never had this problem before, and I seem to have come across it twice today.

What seems to happen is that the insets of the GridBagConstraints in the form
editor get set to null and are rendered unusable or unchangeable. 

Basically, I created a form with components. I set the layout of the container
to Gridbag before placing any components on screen. I never changed the layout
to another layout either. 

I have never had a problem with it before today. To fix the problem, I just had
to use Freedesign because I couldn't edit the insets. This has happened twice
today - each with a different class. It compiles fine but doesn't run fine. It
just seems to set insets to null. 

The last time, the code view says 'insets=null' but in the form editor, it shows
them as having values! (The previous time, even the 'insets' in the layout form
editor said 'null' but they could not be changed.)


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at java.awt.GridBagConstraints.clone(GridBagConstraints.java:499)
        at java.awt.GridBagLayout.setConstraints(GridBagLayout.java:405)
        at java.awt.GridBagLayout.addLayoutComponent(GridBagLayout.java:606)
        at java.awt.Container.addImpl(Container.java:1058)
        at java.awt.Container.add(Container.java:899)
        at
com.ssl.oif.gui.swing.wizards.UserWizard.initComponents(UserWizard.java:395)
        at com.ssl.oif.gui.swing.wizards.UserWizard.<init>(UserWizard.java:94)
        at
com.ssl.oif.gui.swing.AdminUserAndWorkgroupPanel.editUser(AdminUserAndWorkgroupPanel.java:535)
        at
com.ssl.oif.gui.swing.AdminUserAndWorkgroupPanel.access$200(AdminUserAndWorkgroupPanel.java:46)
        at
com.ssl.oif.gui.swing.AdminUserAndWorkgroupPanel$3.actionPerformed(AdminUserAndWorkgroupPanel.java:211)
        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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
        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)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        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 Jan Stola 2006-09-05 11:49:17 UTC
I am sorry I am not able to reproduce this issue. Could you, please, provide 
more details? It would be ideal to attach the corresponding .java and .form 
files (saved in the last good state) and describe exact steps that lead to the 
described problem.

This problem was already reported as issue 74748, but we weren't able to find a 
reproducible test case then.
Comment 2 Jan Stola 2006-09-19 13:44:18 UTC
No additional information provided => closing as WORKSFORME.