Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

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?


1 Solution
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
If you are using Net beans then i thnk it a bug as per


else you need to put forward that piece of code where you are getting the exception.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now