Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: How to open files that are represented in a JTree

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    2
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to open files that are represented in a JTree

    I'm just curious on how you open a file when you double click it's representation in a JTree.

    JTree Example


    Folder-
    SubFolder-
    Text File
    Image File
    Video File <-------- How would you open this file representation by double clicking it??

    Thanks


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How to open files that are represented in a JTree

    I suggest doing a google search of something like "java launch file" or "launch file from java".
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Member
    Join Date
    Feb 2012
    Posts
    58
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Re: How to open files that are represented in a JTree

    Quote Originally Posted by reptar693 View Post
    How would you open this file representation by double clicking it??
    You have to use tree selection listener or mouse clicking event.

Similar Threads

  1. JTree DnD Problem
    By hafunui in forum AWT / Java Swing
    Replies: 3
    Last Post: August 12th, 2011, 10:33 PM
  2. JTree not expanding?
    By captain alge in forum AWT / Java Swing
    Replies: 1
    Last Post: April 15th, 2011, 03:32 AM
  3. could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg
    By miaaa00 in forum Java Theory & Questions
    Replies: 1
    Last Post: March 29th, 2011, 12:45 AM
  4. JTree - Remove All Nodes
    By aussiemcgr in forum Java Theory & Questions
    Replies: 4
    Last Post: December 9th, 2010, 05:27 PM
  5. [SOLVED] Jtree help
    By sman36 in forum AWT / Java Swing
    Replies: 1
    Last Post: December 6th, 2010, 09:39 AM