DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003

    Talking Need some Help with the JTree thing

    Hi there, Im having some problem with my JTree thing!!

    I want to put a backgorund image behind my JTree thing!!!

    I use the following code


    And WORKS!!! but...

    The problem is... my text on the JTree is still with the white background color, the icon on the left of each text its transparent, thats ok, cuz is a gif file with a transparent color. But the text, like i said before its not transparent, the background image is not passing throw.

    I dont know if any of u guys understand my problem

    I you do!!! please help me!!!

    Oh, one more thing, how can I do to place, on the JTree, all the level with the following alignment "left", What I mean is. all the level and sublevels width out that big space on the left on each level and sub-level.

    Ok guy, I hope someone can give me hand

    The Vee ^_^


  2. #2
    Join Date
    Nov 2002
    setting setOpaque to false is right. did you place anything as background image? it should show if you did. you can paint an image as background of a jtree.

    as for making everything, parent and child, appear at the left, i don't know about this. you could try making your own treecellrenderer. define how it should go about when it paints the tree. i once did an explorer sort of program and used jtree, and having it show as it is has its merits.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.