TreeTable with checkbox - Parent checkbox check events not getting fired

i have a sample tree table that has a checkbox,string and some status image as 3 columns.
I have a simple loop that creates table entries using addItem and then every 5th element is treatedas a node with children.
I want users to check these entries but I see that the 5th elements(namely the parents) do not respond.The listener never gets trigerred when I click them,however checking their children works.
I wanted to implement the functionality that if you select a parent then all children in turn get selected too,something on the lines of what we do during some installations on windows (when we choose custom and then we choose a particular feature and all sub features get selected).
I can’t find anything wrong with the way I have implemented or these parent entries being different from their children and so I’m a bit stumped.Please help.
I have attached my source code for your reference.
12977.java (7.49 KB)

Inadvertently I had skipped assigning themselves as parents to these parent nodes so it seemed to not work.I can’t cor-relate the two but once i did
ttable.setParent(i,i) when i%5=0 (every 5th element has the next four as its children in my sample data) it started to work on expected lines.