-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b14
-
generic
-
generic
-
Verified
1. Run the test below on Linux.
2. drag the mouse from horizontal scrollbar into the scrollpane.
3. NPE thrown (this is different from Motif behaviour):
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: scrollpane child is null
at sun.awt.X11.XScrollPanePeer.scroll(XScrollPanePeer.java:295)
at sun.awt.X11.XScrollPanePeer.notifyValue(XScrollPanePeer.java:523)
at sun.awt.X11.XScrollbar$1.run(XScrollbar.java:94)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
import java.awt.*;
public class Test extends Frame
{
ScrollPane pane;
public Test()
{
super("a test");
pane = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
add(pane, BorderLayout.CENTER);
}
public static void main (String str[])
{
Test f = new Test();
f.setVisible(true);
f.validate();
}
}// class
2. drag the mouse from horizontal scrollbar into the scrollpane.
3. NPE thrown (this is different from Motif behaviour):
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: scrollpane child is null
at sun.awt.X11.XScrollPanePeer.scroll(XScrollPanePeer.java:295)
at sun.awt.X11.XScrollPanePeer.notifyValue(XScrollPanePeer.java:523)
at sun.awt.X11.XScrollbar$1.run(XScrollbar.java:94)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
import java.awt.*;
public class Test extends Frame
{
ScrollPane pane;
public Test()
{
super("a test");
pane = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
add(pane, BorderLayout.CENTER);
}
public static void main (String str[])
{
Test f = new Test();
f.setVisible(true);
f.validate();
}
}// class