• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DnD in an Applet

 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet which contains a JTree in the left part of a JSplitPane and a JTable in the right part of a JSplitPane. Both are Drag and Drop enabled. When the Applet loads, I am able to drag from the JTree, but it's as if the JTable does not recognize the drop. I also have a menu to allow the user to change the look and feel between metal, motif, and windows. If I change the LnF, then the DnD works perfectly.
Does anyone out there have any ideas?
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might ask over in the AWT/Swing forum.
 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I might try that as well, but I have this same code as a Swing desktop app and it works fine.
Still Confused
 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still struggling with this. I inserted some basic System.out.println() statements for feedback and it seems as if the table is not recognizing itself as a DropTarget until the LnF is changed. I came to this conclusion because the dragEnter, dragOver, and other methods that receive DropTargetEvents are not being called (until the LnF is changed).
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the same code's working in a non-browser environment OK, then I'd suspect you have a sandbox problem. Then again, my experience with Java Dnd was less than total satisfaction itself
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic