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?