Results 1 to 2 of 2
- 03-28-2012, 10:40 PM #1Member
- Join Date
- Mar 2012
- Rep Power
Drag-and-Drop file import from filesystem?
Hello all, I'm new here and this is my first post.
I'm relatively new to java but am learning fast, and I'm familiar with the fundamental concepts. I mostly just need to get familiar with all of the graphics/GUI APIs for the application/applet Idea I'm working on.
The application/applet I am designing would greatly benefit from an ability for the user to import files by clicking and dragging them into a section of the application directly from the filesystem. My questions are:
- Is it possible in an application? (I'm pretty sure it is.)
- Is it possible in a web-based applet? (Again, I'm pretty sure it is.)
- What APIs am I going to need to use for this function? (what specific packages to import, classes and methods to use?)
I also have a few other questions for those willing to answer:
- How difficult is it to create an applet version of an application, and what are the general steps involved?
- How difficult is it to create a completely custom GUI based on graphics files, and what are the general steps involved?
Thanks in advance.
- 03-29-2012, 11:51 PM #2
Re: Drag-and-Drop file import from filesystem?
Ha what a coincidence, today I've been working on the same thing! From what I have been reading DnD seems like the way to go.
Introduction to DnD (The Java™ Tutorials > Creating a GUI With JFC/Swing > Drag and Drop and Data Transfer)
Personally I found the code from the following link to be useful and it demonstrates that DnD can be used for files dragged from the file system:
Drag and Drop file path to Java Swing JTextField - Stack Overflow
Hope this helps,
- By Dean29126 in forum AWT / SwingReplies: 0Last Post: 01-18-2011, 08:24 AM
- By tomba in forum AWT / SwingReplies: 4Last Post: 12-09-2009, 02:01 PM
- By carderne in forum New To JavaReplies: 0Last Post: 08-31-2009, 10:18 AM
- By thayalan in forum AWT / SwingReplies: 1Last Post: 02-16-2009, 04:04 PM
- By orl132 in forum SWT / JFaceReplies: 1Last Post: 07-05-2008, 12:57 PM