aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTree not desplaying and check boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree not desplaying and check boxes" Watch "JTree not desplaying and check boxes" New topic
Author

JTree not desplaying and check boxes

peter hammond
Ranch Hand

Joined: Apr 20, 2011
Posts: 35
hey all

thought i would give JTrees ago as i have no idea how to use them correctly..

in this project i am using netbeans and created a jTree but i wanted to add in check box's aswell but not come across this before have look over examples and tut's for 2 days now and not sure what way to go now...

i gave up on the IDE JTree and went with a scrollpane and cellrender but it doesn't display in the scrollpane??



then i was going to add in this to get the checkboxes in there..


any guides or guidence will be great many thanks......

i did try the treemodel but cant get checkboxes in it...

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

Here's something I found after a bit of googling: CheckBox Node Tree Sample.

It's a lot more complex than your attempt, but on the other hand it's possible it is too complex. We don't know anything about the age of that page; some things used to be hard to do back in 2002 but are easier now. This might be one of those things but as I said, I don't know.

If you only need the checkboxes to be read-only (you didn't mention whether you do or not) then you could leave out the CellEditor part.
peter hammond
Ranch Hand

Joined: Apr 20, 2011
Posts: 35
cool thanks will give it a look over... i just want to be able select the checkbox then read what was selected...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree not desplaying and check boxes
 
Similar Threads
Need help with dynamic tree view
URGENT :- Creating JTree
render jtree in jtable
Checkbox with Jtree
Code for JTree with checkbox