NullPointerException in javax.swing.JComponent.reshape  
Author Message
jobs239





PostPosted: 2005-8-11 1:09:00 Top

java-programmer, NullPointerException in javax.swing.JComponent.reshape I sometimes get the following exception in my GUI. It is not always
reproducible, so I don't know when it throws this exception. Any idea
what could be the problem?

java.lang.NullPointerException
at javax.swing.JComponent.reshape(JComponent.java:3507)
at java.awt.Component.setBounds(Component.java:1664)
at java.awt.Component.move(Component.java:1541)
at java.awt.Component.setLocation(Component.java:1533)
at javax.swing.JViewport.setViewPosition(JViewport.java:1075)
at
javax.swing.JViewport.scrollRectToVisible(JViewport.java:396)
at
javax.swing.JComponent.scrollRectToVisible(JComponent.java:2636)
at com.sun.forte.st.mpmt.AnTable$1.run(AnTable.java:651)
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)

 
Vova Reznik





PostPosted: 2005-8-11 1:16:00 Top

java-programmer >> NullPointerException in javax.swing.JComponent.reshape email***@***.com wrote:
> I sometimes get the following exception in my GUI. It is not always
> reproducible, so I don't know when it throws this exception. Any idea
> what could be the problem?
>
> java.lang.NullPointerException
> at javax.swing.JComponent.reshape(JComponent.java:3507)
> at java.awt.Component.setBounds(Component.java:1664)
> at java.awt.Component.move(Component.java:1541)
> at java.awt.Component.setLocation(Component.java:1533)
> at javax.swing.JViewport.setViewPosition(JViewport.java:1075)
> at
> javax.swing.JViewport.scrollRectToVisible(JViewport.java:396)
> at
> javax.swing.JComponent.scrollRectToVisible(JComponent.java:2636)
> at com.sun.forte.st.mpmt.AnTable$1.run(AnTable.java:651)
> 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)
>
Does it happened when application is starting?
Is it about JTable/JList inside JScrollBar?
Key of error: reshaping component doesn't have parent
 
Thomas Hawtin





PostPosted: 2005-8-11 2:35:00 Top

java-programmer >> NullPointerException in javax.swing.JComponent.reshape email***@***.com wrote:
> I sometimes get the following exception in my GUI. It is not always
> reproducible, so I don't know when it throws this exception. Any idea
> what could be the problem?
>
> java.lang.NullPointerException
> at javax.swing.JComponent.reshape(JComponent.java:3507)
> at java.awt.Component.setBounds(Component.java:1664)
> at java.awt.Component.move(Component.java:1541)
> at java.awt.Component.setLocation(Component.java:1533)
> at javax.swing.JViewport.setViewPosition(JViewport.java:1075)
> at
> javax.swing.JViewport.scrollRectToVisible(JViewport.java:396)
> at
> javax.swing.JComponent.scrollRectToVisible(JComponent.java:2636)
> at com.sun.forte.st.mpmt.AnTable$1.run(AnTable.java:651)
> 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)

I we're going to make any sense of a stack trace, particularly with line
numbers, then it is going to help if you at least tell us which version
you are using. Perhaps even have a look yourself. Looking at 1.5.0_04
and 1.6.0-ea-b46, JComponent.reshape just calls super.

It would also be handy to say when the problem occurs.

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/