Link to home
Start Free TrialLog in
Avatar of cmp2
cmp2

asked on

Drag and Drop file from desktop to JTable. Works but get a NullPointerException at TableDropTargetListener.restoreComponentState()

What I am doing is enabling dragging and dropping of a file from ann outside source to a JTable. I created the a custom TransferHandler to deal with the new imported file in a way that I need it to. Everything works fine but it also throws a NullPointerException in the background as the title describes originating from the java.awt.EventDispatchThread. This only happens when I set the transferHandler (using my custom TrasferHandler) on the JTable. If I set it on the JScrollPane that contains the JTable, never the NullPointerException. Obviously it's something to do with the JTable. Any ideas on how to fix this?

Thanks,

Cmp2
ASKER CERTIFIED SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial