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 14151 - JDK1.4: SWING components aren't visible in AWT forms and after selecting them NPE arise
Summary: JDK1.4: SWING components aren't visible in AWT forms and after selecting them...
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-08-02 22:06 UTC by khu
Modified: 2003-06-30 18:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NullPointerException (2.91 KB, text/plain)
2001-10-11 15:37 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description khu 2001-08-02 22:06:37 UTC
Platform: Solaris 8
jdk: JDK_1.4_b73
Steps to reproduce:
  on a filesystem   new-->AWT Forms-->Applet
  the workspace switched to GUI Editing, 
  add couple swing componets, e.g. JLabel, JButton etc.
  save all, exit the ide.
Restart ide, you get: 
java.lang.NullPointerException
        at
javax.swing.JComponent.registerNextFocusableComponent(JComponent.java:924)
        at
javax.swing.JComponent.registerNextFocusableComponent(JComponent.java:914)
        at javax.swing.JComponent.addNotify(JComponent.java:4213)
        at java.awt.Container.addImpl(Container.java:479)
        at java.awt.Container.add(Container.java:348)
        at
org.netbeans.modules.form.FormDesigner.addComponentToContainer(FormDesigner.java:832)
        at
org.netbeans.modules.form.FormDesigner.walkVisualComps(FormDesigner.java:730)
        at
org.netbeans.modules.form.FormDesigner.access$300(FormDesigner.java:48)
        at org.netbeans.modules.form.FormDesigner$3.run(FormDesigner.java:628)
        at org.netbeans.modules.form.FormLAF$1.run(FormLAF.java:55)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:860)
        at org.openide.util.Mutex.readAccess(Mutex.java:193)
        at
org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:41)
        at
org.netbeans.modules.form.FormDesigner.repopulateComponentLayerImpl(FormDesigner.java:587)
        at
org.netbeans.modules.form.FormDesigner.access$500(FormDesigner.java:48)
        at org.netbeans.modules.form.FormDesigner$2.run(FormDesigner.java:570)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:167)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:437)
        at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 1 khu 2001-08-02 22:34:29 UTC
The form editor opens with misplaced components. The workaround may be
to
close the editor, and reopen again.
Comment 2 Tomas Pavek 2001-08-03 10:17:35 UTC
We do not support mixing AWT and Swing components as it may cause 
weird issues like this. This still can be problem of the new JDK.

Anyway -- we'll look at it, but at lower priority...
Comment 3 Marian Mirilovic 2001-10-11 15:33:56 UTC
[nb_dev](20011011),[jdk1.4](b82)

NPE described above in tested build isn't arised, but SWING components
aren't visible after close(save) reopen AWT form file. After attempt
to select JLabel in Applet arise number of another NPE (attachment).

Comment 4 Marian Mirilovic 2001-10-11 15:37:46 UTC
Created attachment 2967 [details]
NullPointerException
Comment 5 Tomas Pavek 2001-10-25 16:24:26 UTC
Fixed.
Comment 6 Marian Mirilovic 2001-10-31 11:32:41 UTC
verified in [nb_dev](20011031)
Comment 7 Quality Engineering 2003-06-30 18:27:27 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.