Results 1 to 2 of 2
  1. #1
    kmarie is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

    Default Jtree - making parts editable

    I have a Jtree that models a file system, aka, folders and files on my computer. I want the user to be able to edit (rename) the folders, but make it so the user can not edit (rename) the files.

    I understand that you would normally make a Jtree editable by using:

    tree.setEditable(true);

    However, that makes ALL nodes editable, when I only want certain ones to be editable.

    I can't find anything on google, can this be done?

  2. #2
    kmarie is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

    Default

    Nevermind, I figured it out. I did it by extending JTree and overriding the isEditable() method.

Similar Threads

  1. Replies: 2
    Last Post: 02-18-2008, 04:24 AM
  2. Selecting parts of an image
    By shaungoater in forum Java 2D
    Replies: 1
    Last Post: 12-15-2007, 10:06 PM
  3. JTree trouble
    By Alantie Vala in forum AWT / Swing
    Replies: 3
    Last Post: 07-31-2007, 11:12 PM
  4. how to display data in Jtree
    By paty in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 12:28 AM
  5. Replies: 4
    Last Post: 05-19-2007, 11:15 AM

Posting Permissions

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