title: startEditingAtPath() throws exception when adding a node to a JTree
body: <p><br>
  I'm learning to JTrees and Java.<br>
  Constructive suggestions and feedback are very welcome.<br></p>
  
  <p>I think I am missing some understanding of JTrees and after 5 hours Googling, and testing I'm stuck. I've simplified the code as much as possible.<br></p>
  
  <pre><code>        public void actionPerformed(ActionEvent event) {
              MyNode selNode = (MyNode) m_tree.getLastSelectedPathComponent();
              if (selNode != null) {
                  MyNode newNode = new MyNode("New Node");
                  model.insertNodeInto(newNode, selNode,
                          selNode.getChildCount());
                  MyNode[] nodes = model.getPathToRoot(newNode);
                  TreePath path = new TreePath(nodes);
                  m_tree.scrollPathToVisible(path);
                  m_tree.setSelectionPath(path);
                  // *******   The next line throws the exception shown below.  ****
                  m_tree.startEditingAtPath(path);
              }
  
  
  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  at javax.swing.plaf.basic.BasicTreeUI.startEditing(BasicTreeUI.java:2059)
  at javax.swing.plaf.basic.BasicTreeUI.startEditingAtPath(BasicTreeUI.java:601)
  at javax.swing.JTree.startEditingAtPath(JTree.java:2349)
  at ItemCreator.ItemCreator$1.actionPerformed(ItemCreator.java:74)
  </code></pre>
  
  <p><a href="http://www.hal9000.net.au/code/mutablejtree/" rel="nofollow">Code - My Simple Mutable JTree</a></p>
  
  <p>1) When adding a new node into the JTree the code throws Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException</p>
  
  <p>2) Any general constructive feedback very welcome. </p>
  
  <p>Kind regards</p>