• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need some help creating a JTreeTable  RSS feed

 
Pat O'Hara
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am working on a project that needs to run against Java 1.2. I would like to use a TreeTable. That is a Table that has a column that contains "plus" buttons to show sub-rows of that row. It looks something like this <http://www.maxdesign.com.au/articles/tree-table/>. I am aware that there is an Outline class, but it does not appear to exist in Java 1.2.2. I am thinking that I can put a CheckBox in the first column. If I change the Icons for the checkbox then it can appear as a tree plus/minus box. I know that I can get a checkbox by putting a boolean value in that column. Unfortunately, I do not know how I could customize the checkbox. I also do not know how I would capture the click events. I feel like I am close, but the examples I have found talk about how easy it is to just use a boolean value.

Thanks in advance for whatever help you can give.
Pat O
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
don't know if this is any good to you - this is sun's article about creating treetables

http://java.sun.com/products/jfc/tsc/articles/treetable1/

if you want +/- for the closed/open icons, that's not hard.

if you want a checkbox for the leafs, also not hard.

but, never tried them on treetables, so don't know if they'd be as simple.
 
Pat O'Hara
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I had found that article. I will go through it again and see if I can get it to compile.

Pat O
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!