title: Swing JTree how custom Render get value from custom Editor?
body: <p>I try to make JTree with custom TreeRenderer</p>
  <pre><code>public class TextCellRender implements TreeCellRenderer {
      JPanel panel;
      JTextArea text;
      JLabel label;
      LayoutManager Layout;
  
      public TextCellRender() {
          text = new JTextArea();
          text.setWrapStyleWord(true);
          text.setLineWrap(true);
          text.setSize(360, text.getPreferredSize().height);
          label = new JLabel();
          panel = new JPanel();
          panel.add(label);
          panel.add(text);
      }
  
      @Override
      public Component getTreeCellRendererComponent(JTree tree, Object value, 
              boolean selected, boolean expanded, boolean leaf,
              int row, boolean hasFocus) {
          Component returnValue = null;
          if ((value != null) &amp;&amp; (value instanceof DefaultMutableTreeNode)) {
              Object userObject = ((DefaultMutableTreeNode) value).getUserObject();
              if ((userObject instanceof FieldObj)) {
                  FieldObj my = (FieldObj) userObject;
                  String fieldText = &quot;&quot;;
  
                  text.setText(my.valueList);
                  label.setText(my.FieldName);
  
              }
              return panel;
          }
          return returnValue;
      }
  }
  </code></pre>
  <p>and with custom Editor</p>
  <pre><code>public class TextCellEdit extends AbstractCellEditor implements TreeCellEditor {    
  </code></pre>
  <p>Which getTreeCellEditorComponent return panel as getTreeCellEditorComponent but with JComboBox which Items populates from db.
  Render and Editor work great I can click on field and comboBox shows with values from db.</p>
  <pre><code>public Component getTreeCellEditorComponent(JTree tree, Object value, 
          boolean isSelected, boolean expanded, boolean leaf, int row) {
      if (value != null &amp;&amp; value instanceof DefaultMutableTreeNode) {
          Object userObject = ((DefaultMutableTreeNode) value).getUserObject();
          if (userObject instanceof FieldObj) {
              FieldObj my = (FieldObj) userObject;
              box.removeAllItems();
              label.setText(my.FieldName);
              populatebox(my.FieldName);
              box.addItem(my.valueList);
              panel.add(label);
              panel.add(box);
          } else {
              box.addItem(&quot;Uknown object type&quot;);
          }
          return panel;
      }
  }
  public Object getCellEditorValue() { 
      System.out.println(&quot;getCellEditoValue returns :&quot; + box.getSelectedItem());
      return box.getSelectedItem();
  }
  </code></pre>
  <p>But it doesn't save in Render textArea
  I mean in Render I have panel with:<br />
  JLabel (FieldName)<br />
  JTextArea (FieldValue)</p>
  <p>when I click on JTextArea I have my Editor which has:<br />
  JLabel (FieldName)<br />
  JComboBox(FieldValues which I have populated from db)</p>
  <p>but when I chose something from Edit ComboBox it doesn't save in Render TextArea
  So the question is how this things should work?</p>
  <p><strong>How render component get value from Edit component?</strong></p>