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 33258 - Adding the ScrollPane into the form fires exception
Summary: Adding the ScrollPane into the form fires exception
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords: JDK_SPECIFIC
: 35082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-25 14:18 UTC by Jaromir Uhrik
Modified: 2003-12-11 14:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch for NB 3.5.x (41.78 KB, application/octet-stream)
2003-10-13 16:51 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2003-04-25 14:18:59 UTC
[#200304242350; jdk1.4.2 beta 20]
1.Run IDE and create new JFrame Form
2.Add the AWT ScrollPane into this form
3.Exception will pop up
This behaviour is doesn't appear when I use previous 
version of jdk(1.4.1_02). See stacktrace below.

Annotation: Invalid value. The property scrollPosition 
could not be set. Reason:
null
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at 
org.netbeans.modules.form.RADProperty.getTargetValue
(RADProperty.java:75)
	at 
org.netbeans.modules.form.FormProperty.checkCurrentValue
(FormProperty.java:802)
	at org.netbeans.modules.form.FormProperty.getValue
(FormProperty.java:183)
	at 
org.openide.explorer.propertysheet.PropertyPanel$SimpleMode
l.getValue(PropertyPanel.java:1467)
	at 
org.openide.explorer.propertysheet.PropertyPanel.updateEdit
or(PropertyPanel.java:686)
	at 
org.openide.explorer.propertysheet.PropertyPanel.<init>
(PropertyPanel.java:284)
	at 
org.openide.explorer.propertysheet.PropertyPanel.<init>
(PropertyPanel.java:290)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.fillPro
perties(PropertySheetTab.java:290)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.createP
ane(PropertySheetTab.java:238)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.ensureP
aneCreated(PropertySheetTab.java:193)
	at 
org.openide.explorer.propertysheet.PropertySheet.navToCorre
ctPage(PropertySheet.java:593)
	at 
org.openide.explorer.propertysheet.PropertySheet.setCurrent
Node(PropertySheet.java:621)
	at 
org.openide.explorer.propertysheet.PropertySheet.access$900
(PropertySheet.java:53)
	at 
org.openide.explorer.propertysheet.PropertySheet$3.run
(PropertySheet.java:271)
	at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:454)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:201)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)
Caused by: java.lang.NullPointerException: child is null
	at java.awt.ScrollPane.getScrollPosition
(ScrollPane.java:359)
[catch] ... 25 more
==>
java.lang.NullPointerException: child is null
	at java.awt.ScrollPane.getScrollPosition
(ScrollPane.java:359)
	at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at 
org.netbeans.modules.form.RADProperty.getTargetValue
(RADProperty.java:75)
	at 
org.netbeans.modules.form.FormProperty.checkCurrentValue
(FormProperty.java:802)
	at org.netbeans.modules.form.FormProperty.getValue
(FormProperty.java:183)
	at 
org.openide.explorer.propertysheet.PropertyPanel$SimpleMode
l.getValue(PropertyPanel.java:1467)
	at 
org.openide.explorer.propertysheet.PropertyPanel.updateEdit
or(PropertyPanel.java:686)
	at 
org.openide.explorer.propertysheet.PropertyPanel.<init>
(PropertyPanel.java:284)
	at 
org.openide.explorer.propertysheet.PropertyPanel.<init>
(PropertyPanel.java:290)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.fillPro
perties(PropertySheetTab.java:290)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.createP
ane(PropertySheetTab.java:238)
	at 
org.openide.explorer.propertysheet.PropertySheetTab.ensureP
aneCreated(PropertySheetTab.java:193)
	at 
org.openide.explorer.propertysheet.PropertySheet.navToCorre
ctPage(PropertySheet.java:593)
	at 
org.openide.explorer.propertysheet.PropertySheet.setCurrent
Node(PropertySheet.java:621)
	at 
org.openide.explorer.propertysheet.PropertySheet.access$900
(PropertySheet.java:53)
[catch] at 
org.openide.explorer.propertysheet.PropertySheet$3.run
(PropertySheet.java:271)
	at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:454)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:201)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)
Comment 1 Tomas Pavek 2003-04-30 18:41:24 UTC
Will check the difference between jdk 1.4.2 and 1.4.1.
Comment 2 Tomas Pavek 2003-07-23 12:56:16 UTC
*** Issue 35093 has been marked as a duplicate of this issue. ***
Comment 3 Tomas Pavek 2003-07-23 12:57:53 UTC
*** Issue 35082 has been marked as a duplicate of this issue. ***
Comment 4 Tomas Pavek 2003-10-13 15:50:37 UTC
Basically caused indirectly by fix of 4810551 in JDK 1.4.2.
java.beans.Introspector now checks whether BeanInfo class found on
search path belongs to the bean class whose BeanInfo is searched for.
Unfortunately, this check does not pass if the BeanInfo does not
provide any descriptors (BeanDescriptor, PropertyDescriptor, etc) that
could be used for checking. That's also the case of ScrollPaneBeanInfo
provided by form module - Introspector is not sure if it really
belongs to java.awt.ScrollPane so it is refused and uses reflection to
scan ScrollPane class. This way it recognizes also
get/setScrollPosition as property - which cannot be used as property
because the getter behaves incorrectly (for property getter) - throws
NPE if no component is in the scroll pane.
Comment 5 Tomas Pavek 2003-10-13 16:35:27 UTC
Fixed in dev trunk. Added BeanDescriptor to all BeanInfo classes.
Applied also to prj40_prototype branch.

Comment 6 Tomas Pavek 2003-10-13 16:51:34 UTC
Created attachment 11843 [details]
patch for NB 3.5.x
Comment 7 Tomas Pavek 2003-10-13 16:53:54 UTC
To use the patch, create org-netbeans-modules-form directory
in your $nb_install$/modules/patches and place the patch jar file in
there.
Comment 8 Jaromir Uhrik 2003-10-14 08:04:30 UTC
Verified in both:
-3.5 with the patch
-NetBeansIDE-dev-200310140100