Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

DnD in an Applet

 
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?
 
Saloon Keeper
Posts: 22122
151
Android Eclipse IDE Tomcat Server Redhat Java 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: 22122
151
Android Eclipse IDE Tomcat Server Redhat Java 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
 
I can't take it! You are too smart for me! Here is the tiny ad:
ScroogeXHTML 9.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/731949/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic