• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Drag and Drop and the JFrame...

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings Swingers!
I was hoping some of you ranch hands might shed some light on this phenonmenon.
I have a Swing application that uses the JTree and have implemented drag and drop. The application runs as an applet and the drag and drop in the tree triggers messages to servlets and then manipulates a back end Oracle database accordingly. Quite cool!
This all works fine when I use the JFrame but when I put the JTree directly on the JApplet container (which causes the app to be "fixed" on the HTML page as opposed to bringing up the JFrame in a separate window) some drag events fire and some don't. I have put System.err.println statements in all the DnD events so I can see in the Java plug-in console whats happening.
Has anyone experienced this phenomenon? Is there something inherent in the JFrame that captures events in a different way?

I'll supply code if y'all would like to try this out...its test code that doesn't do any applet-servlet comm or db stuff.
I would be most gratefull for any insight here...thanx in advance.
George.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you used the Sun plug-in to get your browser to use the 1.3 version of java?
 
George Thomas
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Cindy.
Yes, I'm using the 1.3 plug-in. I guess its not such a great big deal to have the Java Applet Window appear for DnD functionality but from a UI perspective its nice to have the tree "planted" on the html page of the browser. You have issues of losing focus and the Java Applet Window dissapearing behind the browser etc.
Care to take a stab at the code? And if so how do I format it to keep everybody happy?
George.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the faq:
http://www.javaranch.com/ubb/faq.jsp#q4
The plain and simple answer is to put tags around your code.
 
George Thomas
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks Carol.
George.
 
reply
    Bookmark Topic Watch Topic
  • New Topic