public boolean isCellEditable(EventObject e){
  if (e instanceof MouseEvent) {
    for (int counter=getColumnCount() - 1; counter >= 0; counter--) {
      if (getColumnClass(counter) == TreeTableModel.class) {
        MouseEvent me=(MouseEvent)e;
        MouseEvent newME=new MouseEvent(tree,me.getID(),me.getWhen(),me.getModifiers(),me.getX() - getCellRect(0,counter,true).x,me.getY(),me.getClickCount(),me.isPopupTrigger());
        tree.dispatchEvent(newME);
        break;
      }
    }
  }
  return false;
}

public boolean isCellEditable ( EventObject e ) { if ( e instanceof MouseEvent ) { for ( int counter = getColumnCount ( ) - 1 ; counter >= 0 ; counter -- ) { if ( getColumnClass ( counter ) == TreeTableModel . class ) { MouseEvent me = ( MouseEvent ) e ; MouseEvent newME = new MouseEvent ( tree , me . getID ( ) , me . getWhen ( ) , me . getModifiers ( ) , me . getX ( ) - getCellRect ( 0 , counter , true ) . x , me . getY ( ) , me . getClickCount ( ) , me . isPopupTrigger ( ) ) ; tree . dispatchEvent ( newME ) ; break ; } } } return false ; }
overridden to return false , and if the event is a mouse event it is forwarded to the tree . < p > the behavior for this is debatable , and should really be offered as a property . by returning false , all keyboard actions are implemented in terms of the table . by returning true , the tree would get a chance to do something with the keyboard events . for the most part this is ok . but for certain keys , such as left / right , the tree will expand / collapse where as the table focus should really move to a different column . page up / down should also be implemented in terms of the table . by returning false this also has the added benefit that clicking outside of the bounds of the tree node , but still in the tree column will select the row , whereas if this returned true that wouldn ' t be the case . < p > by returning false we are also enforcing the policy that the tree will never be editable ( at least by a key sequence ) .
