String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f);  if (s != null) { size.x = getRowX(row, depth); size.width = SwingUtilities.computeStringWidth(fm, s); size.height = fm.getHeight(); } return size;
    public Rectangle getNodeDimensions(Object value, int row, int depth,                                       boolean expanded, Rectangle size)    {      return null;    }