<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://java.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0">
<channel>
 <title>Javalobby - Comments for &quot;The secret life of a DefaultTreeModel&quot;</title>
 <link>http://java.dzone.com/news/secret-life-defaulttreemodel</link>
 <description>Comments for &quot;The secret life of a DefaultTreeModel&quot;</description>
 <language>en</language>
<item>
 <title>I wish I had something like</title>
 <link>http://java.dzone.com/news/secret-life-defaulttreemodel#comment-2438</link>
 <description>&lt;!--paging_filter--&gt;I wish I had something like this two years ago. Good work! :D</description>
 <pubDate>Sun, 06 Apr 2008 19:16:57 -0400</pubDate>
 <dc:creator>soronthar</dc:creator>
 <guid isPermaLink="false">comment 2438 at http://java.dzone.com</guid>
</item>
<item>
 <title>Jeanette,Thanks for the</title>
 <link>http://java.dzone.com/news/secret-life-defaulttreemodel#comment-2056</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Jeanette,&lt;/p&gt;&lt;p&gt;Thanks for the feedback. I&#039;ll change the bulk child insert to just add a large block of children and not grandchildren.  I&#039;ll also add in a block for the valueForPathChanged method. Mostly this tutorial grew out of my frustration with a software system that used a node based update system.  I can&#039;t tell you how many &amp;quot;update causes ... in main tree&amp;quot; bugs I had to deal with as a result. &lt;/p&gt;&lt;p&gt;Thanks again for the feedback. 

&lt;/p&gt;&lt;p&gt;Collin&lt;/p&gt;</description>
 <pubDate>Wed, 26 Mar 2008 14:13:26 -0400</pubDate>
 <dc:creator>cfagan</dc:creator>
 <guid isPermaLink="false">comment 2056 at http://java.dzone.com</guid>
</item>
<item>
 <title>doohhh .. lost my first</title>
 <link>http://java.dzone.com/news/secret-life-defaulttreemodel#comment-2051</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;doohhh .. lost my first trial to comment, so here#s a shorter version :-(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Collin,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;always good to see propagation of best-practices :-) Just two minor points:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;- the insert-many nodes example is a bit off target, IMO: basically it&#039;s inserting grandchildren. As tree notification is about children only, there&#039;s is no need to care about them (and no need for a structureChanged) - it&#039;s good enough to nodify the insertion of the two new children (odd and even)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;code&amp;gt;&lt;/p&gt;&lt;p&gt;model.nodesWereInserted(node, new int[] {node.getIndex(odd), node.getIndex(even)});&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&amp;lt;/code&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;so it&#039;s this one notification vs. two if using the model methods. Not so much of an incentive to go a more error-prone path. Obviously a judgement call :-) &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; - your change example can be done directly through the model (after all, we know we have DefaultMTNs :-)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;code&amp;gt; &lt;/p&gt;&lt;p&gt; tree.getModel().valueForPathChanged(currentSelection, &amp;quot;This is a very loooooooooooooooog string&amp;quot;);&lt;/p&gt;&lt;p&gt; &amp;lt;/code&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; CU&lt;/p&gt;&lt;p&gt;Jeanette &lt;/p&gt;</description>
 <pubDate>Wed, 26 Mar 2008 12:43:50 -0400</pubDate>
 <dc:creator>jw54674</dc:creator>
 <guid isPermaLink="false">comment 2051 at http://java.dzone.com</guid>
</item>
</channel>
</rss>
