'NullPointerException' with rapid mouse button or keyboard button presses.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sami_Viitanen
Posted On:   Monday, June 4, 2001 11:08 PM

I have created own listener which combines mouse listener and keyboard listener (ClientUserInterfaceListener). This listener is added to my own panel class (extended from JPanel). When an event (key or mouse) is captured by the listener the method 'mouseAction' in my controller class (contentController) is called. Problem: When I do multiple clicks with mouse or keyboard I get following exceptions. Any experiences about this? Exception occurred during event dispatching: java.lang.NullPointerException at sst.client.ContentController.mouseAction(ContentController.java:888) at sst.client.listener.ClientUserInterfaceListener.mousePressed(ClientUs erInterfaceListener.java:35) at java.awt.Component.pr   More>>

I have created own listener which combines mouse listener and keyboard listener (ClientUserInterfaceListener). This listener is added to my own panel class (extended from JPanel). When an event (key or mouse) is captured by the listener the method 'mouseAction' in my controller class (contentController) is called.

Problem: When I do multiple clicks with mouse or keyboard I get following exceptions. Any experiences about this?


Exception occurred during event dispatching:
java.lang.NullPointerException
at sst.client.ContentController.mouseAction(ContentController.java:888)
at sst.client.listener.ClientUserInterfaceListener.mousePressed(ClientUs
erInterfaceListener.java:35)
at java.awt.Component.processMouseEvent(Component.java:3714)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
3)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at

   <<Less
About | Sitemap | Contact