• Post Reply Bookmark Topic Watch Topic
  • New Topic

NullPointerException at BasicTableUI$MouseInputHandle  RSS feed

 
Vinayak Reddy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using a Jtable and adding certain custom components to it. I get the following NullpointerException when I click on cell which has the custom component(A JPanel with a list dropdown). But if I tab to that particular cell and then click with the mouse I don't find the NullpointerException.

EXCEPTION:

java.lang.NullPointerException

at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setDispatchComponent(BasicTableUI.java:461)

at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.adjustFocusAndSelection(BasicTableUI.java:511)

at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(BasicTableUI.java:494)

at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)

at java.awt.Component.processMouseEvent(Component.java:5097)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java)

at java.awt.Component.dispatchEvent(Component.java)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:458)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


Please help me resolve the issue. Thanks in advance.

Vinayak.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post your code, or a small compilable sample program that demonstrates the problem
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!