Results 1 to 2 of 2
  1. #1
    alaskatroll is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Question 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.

  2. #2
    Join Date
    Jul 2011
    Posts
    30
    Rep Power
    0

    Default 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,

    Regards Serb.

Similar Threads

  1. drag and drop
    By Dean29126 in forum AWT / Swing
    Replies: 0
    Last Post: 01-18-2011, 07:24 AM
  2. drag and drop - disable intra component drop
    By tomba in forum AWT / Swing
    Replies: 4
    Last Post: 12-09-2009, 01:01 PM
  3. Drag and Drop
    By carderne in forum New To Java
    Replies: 0
    Last Post: 08-31-2009, 09:18 AM
  4. Drag and drop
    By thayalan in forum AWT / Swing
    Replies: 1
    Last Post: 02-16-2009, 03:04 PM
  5. Drag&Drop of a file in an editor
    By orl132 in forum SWT / JFace
    Replies: 1
    Last Post: 07-05-2008, 11:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •