by Dinesh Thakur Category: Swing


import java.awt.*;

import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
public class JavaExampleTreeEditInJApplet extends JApplet implements CellEditorListener
    public void init()
        JTree Tree = new JTree();
          public void editingCanceled(ChangeEvent e1)
               CellEditor ClEdtr = (CellEditor)e1.getSource();
               showStatus("Change Not Done");
               public void editingStopped(ChangeEvent e2)
                  CellEditor ClEdtr = (CellEditor)e2.getSource();
                  showStatus("New Text: " + (String)ClEdtr.getCellEditorValue());
/*<APPLET CODE=JavaExampleTreeEditInJApplet.class WIDTH=350 HEIGHT=280> </APPLET>*/ 
Java JTree Cell Editor Example

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles