Editing in JTree...

hi All,
1) In all JTree component,there is default editor.
If you click a node,then again if you click that node,
some editor is coming by default ,which is holding the whole text of the selectednode.I want to highlight all the characters in that editor.Is it possible?
2) Similarly In some situation,under particular parent I don't want to allow such type of default editor to edit for all the children.Is it possible?
3)Like windows Explorer feature,I want to set the tooltip box for the node which is hidden partly in the JTree
Is it possible?
If any suggestions,it will be appreciated.
Advanced thanks

Hi
1) overwrite starteditingatpath from JTree, call method of superclass and request focus for editing component afterwards. You can also add some code to the cellEditor (waiting and selecting).
2) extend your cell editor, check node and allow editing only if possible
3) you can set a tooltip for each node. getToolTipText(MouseEvent) of the JTree asks the different values from the cell renderer (bad performance as everytime called, tooltip should be shown). overwrite method, ask if node is fully visible and return the tooltip of the node only in this case
Hope this helps

Similar Messages

  • How do I set new node only editable in JTree

    Hi All
    In my application I want JTree node text is editable only when new node is added not the existing nodes.Could any one please suggest solution
    for this. Some code snippet is appreciated.
    Thanks

    Write a Tree Model Listener and set the text editable in the treeNodesInserted method.
    Some help can be found here:
    http://java.sun.com/docs/books/tutorial/uiswing/events/treemodellistener.html

  • Single Click start Edit in JTree, if component already selected

    Hi all,
    How would you go about making an editor start after a node has been clicked and was previously selected?
    It's driving me insane. I've tried focus listeners, selection listeners, and mouse listeners, but I can never get the timing right. If someone could outline the process that would be great.

    How about I post my hack...
    If you extend DefaultTreeCellEditor, you can override
    protected boolean canEditImmediately(EventObject event) {
    To check for selection and if selected check for mouseclick 1 and left and inHitBox.

  • JTree editing

    I want to start editing of a node, only if the user choose a menu item.
    If the user stops editing the tree shouldn't be editable any more.
    I tried to use the following code
    myTree.setCellEditor(new DefaultTreeCellEditor(myTree,(DefaultTreeCellRenderer)myTree.getCellRenderer())
          public void cancelCellEditing()
            tree.getModel().valueForPathChanged(tree.getSelectionPath(),getCellEditorValue());
            tree.setEditable(false);
        });but the Tree isn't set to editable false, after finishing editing.

    I want to start editing of a node, only if the user
    choose a menu item.
    If the user stops editing the tree shouldn't be
    editable any more.
    I tried to use the following codecancelCellEditing() is called only when the user has canceled the cell editting. For example, the user types a new name, and then pushes escape which will revert back to his old text. This is dependant as to how the cell editor works, but with the default, JTextField, this is called only when someone hits escape, or selects another node in the tree.
    If you put your code in stopCellEditting() is should work better. I don't think you want to call valueForPathChanged inside cancel method. JTree will call valueForPathChanged for you after the editor has properly stopped editting. The CellEditor is responsible for knowing when to stop vs. cancel editting. JTree will handle updating the model.
    That's why your edits are being saved, but the setEditable() method is not being called, because the editor isn't calling cancelCellEditting() which I think is what is leading to your confusion.
    charlie

  • Focus Problem with JTree and Menus

    Hi all,
    I have a problem with focus when editing a JTree and selecting a menu. The problem occurs when the user single clicks on a node, invoking the countdown to edit. If the user quickly clicks on a menu item, the focus will go to the menu item, but then when the countdown finishes, the node now has keyboard focus.
    Below is code to reproduce the problem. Click on the node, hover for a little bit, then quickly click on the menu item.
    How would I go about fixing the problem? Thanks!
    import java.awt.Container;
    import java.awt.GridLayout;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    public class MyTree extends JTree {
         public MyTree(DefaultTreeModel treemodel) {
              setModel(treemodel);
              setRootVisible(true);
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JMenuBar bar = new JMenuBar();
              JMenu menu = new JMenu("Test");
              JMenuItem item = new JMenuItem("Item");
              menu.add(item);
              bar.add(menu);
              frame.setJMenuBar(bar);
              Container contentPane = frame.getContentPane();
              contentPane.setLayout(new GridLayout(1, 2));
              DefaultMutableTreeNode root1 = new DefaultMutableTreeNode("Root");
              root1.add(new DefaultMutableTreeNode("Root2"));
              DefaultTreeModel model = new DefaultTreeModel(root1);
              MyTree tree1 = new MyTree(model);
              tree1.setEditable(true);
              tree1.setCellEditor(
                   new ComponentTreeCellEditor(
                        tree1,
                        new ComponentTreeCellRenderer()));
              tree1.setRowHeight(0);
              contentPane.add(tree1);
              frame.pack();
              frame.show();
    import java.awt.FlowLayout;
    import java.util.EventObject;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeCellEditor;
    import javax.swing.tree.TreeCellRenderer;
    public class ComponentTreeCellEditor
         extends DefaultTreeCellEditor
         implements TreeCellEditor {
         private String m_oldValue;
         private TreeCellRenderer m_renderer = null;
         private DefaultTreeModel m_model = null;
         private JPanel m_display = null;
         private JTextField m_field = null;
         private JTree m_tree = null;
         public ComponentTreeCellEditor(
              JTree tree,
              DefaultTreeCellRenderer renderer) {
              super(tree, renderer);
              m_renderer = renderer;
              m_model = (DefaultTreeModel) tree.getModel();
              m_tree = tree;
              m_display = new JPanel(new FlowLayout(FlowLayout.LEFT));
              m_field = new JTextField();
              m_display.add(new JLabel("My Label "));
              m_display.add(m_field);
         public java.awt.Component getTreeCellEditorComponent(
              JTree tree,
              Object value,
              boolean isSelected,
              boolean expanded,
              boolean leaf,
              int row) {
              m_field.setText(value.toString());
              return m_display;
         public Object getCellEditorValue() {
              return m_field.getText();
          * The edited cell should always be selected.
          * @param anEvent the event that fired this function.
          * @return true, always.
         public boolean shouldSelectCell(EventObject anEvent) {
              return true;
          * Only edit immediately if the event is null.
          * @param event the event being studied
          * @return true if event is null, false otherwise.
         protected boolean canEditImmediately(EventObject event) {
              return (event == null);
    }

    You can provide a cell renderer to the JTree to paint the checkBox.
    The following code checks or unchecks the box with each click also:
    _tree.setCellRenderer(new DefaultTreeCellRenderer()
      private JCheckBox checkBox = null;
      public Component getTreeCellRendererComponent(JTree tree,
                                                    Object value,
                                                    boolean selected,
                                                    boolean expanded,
                                                    boolean leaf,
                                                    int row,
                                                    boolean hasFocus)
        // Each node will be drawn as a check box
        if (checkBox == null)
          checkBox  = new JCheckBox();
          checkBox .setBackground(tree.getBackground());
        DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
        checkBox.setText(node.getUserObject().toString());
        checkBox.setSelected(selected);
        return checkBox;
    });

  • TextField in JTree

    Hi,
    I'm using a treeCellEditor to edit a jtree with textfields. It's works but I don't know how to make the cursor disappear in the textfield when I type on ENTER :
    textField.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent evt) {
    if (evt.getKeyChar() == '\n') {
    System.out.println("enter typed on the textfield");
    // I make the action I want
    // I'd like to make the cell editing stop
    --> I don't know what to do <--
    Thanks

    I thougth JTree provides a textfield for cell editing by default when you call jTree.setEditable(true) ???
    The default cell editor disappears when you type enter. So you might have read away the ENTER key with e.consume() in some KeyListener for jTree.
    Besides, to catch the ENTER key you must write
    if (e.getKeyCode() == KeyEvent.VK_ENTER) ...

  • TreeTrable problem editing the treecell

    Hi,
    I am using the TreeTable example for Sun. And i am trying to edit the Jtree cell. But it does not work correctly.
    When i modifie the TreeTableCellEditor by setting true to the isCellEditable i got strange behavoir.
    I would like to know what should i do to be able to edit the cell inside the jtree cell renderer.
    Thanks

    thanks,
    What do you neans by "but what can i do to prvent the user from editing the table?"
    Do you means that it is not possile to edit a Jtree Node inside a Jtable because the Jtable refreach.
    I find a way to open the editot for the Jtree cell inside the Jtable. I agree there is some strange behavior.
    So it is possible to by pass the Jtable refreaf during the set up of the jTree cell editor
    thanks

  • Problem with JTree editing icons

    Hello,
    I want to edit another icons than the default icons in JTree object.
    I look in the javadoc at the several methods, but I do not find a method witch can give me the possibility to setup the collapsed and expanded icon.
    If some one now how to do that, it will be cool.
    Thanks.

    I write this class :
    public class SampleTreeCellRenderer extends TreeCellRenderer
    /** Font used if the string to be displayed isn't a font. */
    static protected Font defaultFont;
    /** Icon to use when the item is collapsed. */
    static protected ImageIcon collapsedIcon;
    /** Icon to use when the item is expanded. */
    static protected ImageIcon expandedIcon;
    /** Color to use for the background when selected. */
    static protected final Color SelectedBackgroundColor=Color.yellow;
    static
         try {
         defaultFont = new Font("SansSerif", 0, 12);
    } catch (Exception e) {}
         try {
         collapsedIcon = new ImageIcon("images/collapsed.gif");
         expandedIcon = new ImageIcon("images/expanded.gif");
         } catch (Exception e) {
         System.out.println("Couldn't load images: " + e);
    public SampleTreeCellRenderer() {
    super();
    public SampleTreeCellRenderer(String collapsedImagePath,String expandedImagePath) {
    super();
         try {
         if (collapsedImagePath!=null) collapsedIcon = new ImageIcon(collapsedImagePath);
         if (expandedImagePath!=null) expandedIcon = new ImageIcon(expandedImagePath);
         } catch (Exception e) { System.out.println("Couldn't load images: " + e); }
    public void setCollapsedIcon(String path) {
    try {
    if (path!=null) collapsedIcon=new ImageIcon(path);
    } catch (Exception e) { System.out.println("Couldn't load images: " + e); }
    public void setExpandedIcon(String path) {
    try {
    if (path!=null) expandedIcon=new ImageIcon(path);
    } catch (Exception e) { System.out.println("Couldn't load images: " + e); }
    /** Whether or not the item that was last configured is selected. */
    protected boolean selected;
    public Component getTreeCellRendererComponent(
    JTree tree, Object value,     
    boolean selected, boolean expanded,
    boolean leaf, int row, boolean hasFocus) {
         Font font;
         String stringValue = tree.convertValueToText(value, selected,expanded,leaf,row,hasFocus);
         /* Set the text. */
         setText(stringValue);
         /* Tooltips used by the tree. */
         setToolTipText(stringValue);
         /* Set the image. */
         if(expanded) { setIcon(expandedIcon); }
         else if(!leaf) { setIcon(collapsedIcon);}
    else { setIcon(null);}
         /* Update the selected flag for the next paint. */
         this.selected = selected;
         return this;
    public void paint(Graphics g) {
         super.paint(g);
    } // end of class SampleTreeCellRenderer
    I test it but I do not understand why it do not display the icons.

  • Problem with JTree custom renderer when editing

    I have a JTree which uses a custom renderer to display my own icons for different types of nodes. The problem I am having is when I setEditable to true and then attept to edit a node the icon switches back to the default icon, as soon as I am done editing it goes back.
    What I am doing wrong?

    Here is my rendererer
    public class DeviceTreeRenderer extends DefaultTreeCellRenderer implements GuiConstants {
       public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
          JLabel returnValue = (JLabel)super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
          if (value != null) {
             returnValue.setToolTipText(value.toString());
          if (value instanceof Device) {
             returnValue.setIcon(TREE_DEVICE);
             if (!((Device)value).isAlive()) {
                returnValue.setEnabled(false);
          else if (value instanceof GuiPanelGroup) {
             if (expanded) {
                returnValue.setIcon(TREE_PANEL_GROUP_OPEN);
             else {
                returnValue.setIcon(TREE_PANEL_GROUP_CLOSED);
          else if (value instanceof GuiPanel && ((GuiPanel)value).isDirty()) {
             returnValue.setIcon(TREE_PANEL_DIRTY);
          return returnValue;
    }Here is my editor:
    public class WwpJTreeCellEditor extends DefaultTreeCellEditor implements GuiConstants {
          private WwpJTree tree;
           * Creates a new WwpJTreeCellEditor.
           * @param tree The WwpJTree to associate with this editor.
          public WwpJTreeCellEditor(WwpJTree tree) {
             super(tree, (DefaultTreeCellRenderer)tree.getCellRenderer());
             this.tree = tree;
           * Overrides the default isCellEditable so that we check the isEditable() method
           * of the WwpJTreeNodes.
           * @param e An EventObject.
          public boolean isCellEditable(EventObject e) {
             boolean returnValue = super.isCellEditable(e);
             if (returnValue) {
                WwpJTreeNode node = this.tree.getSelectedNode();
                if (node == null || !node.isEditable() || node.isDragging()) {
                   returnValue = false;
             return returnValue;
       }In my JTree I make these calls:
    super.setCellRenderer(new DeviceTreeRenderer());
    super.setCellEditor(new WwpJTreeCellEditor(this));
    super.setEditable(true);

  • Icon was changed to default icon when editting a node on JTree

    I have a tree with icon on nodes. However, when I edit the node, the icon is changed to default icon.
    I don't known how to write the treeCellEditor to fix that one.
    The following is my code:
    package description.ui;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.ToolTipManager;
    import javax.swing.WindowConstants;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    public class Tree extends javax.swing.JPanel {
         private JTree tree;
         private JScrollPane jScrollPane1;
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.getContentPane().add(new Tree());
              frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              frame.pack();
              frame.show();
         public Tree() {
              super();
              initGUI();
         private void initGUI() {
              try {
                   BorderLayout thisLayout = new BorderLayout();
                   this.setLayout(thisLayout);
                   setPreferredSize(new Dimension(400, 300));
                    jScrollPane1 = new JScrollPane();
                    this.add(jScrollPane1, BorderLayout.CENTER);
                        DefaultMutableTreeNode rootNode = createNode();
                        tree = new JTree(rootNode);
                        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
                        jScrollPane1.setViewportView(tree);
                        ToolTipManager.sharedInstance().registerComponent(tree);
                        MyCellRenderer cellRenderer = new MyCellRenderer();
                        tree.setCellRenderer(cellRenderer);
                        tree.setEditable(true);
                        tree.setCellEditor(new DefaultTreeCellEditor(tree, cellRenderer));
                        //tree.setCellEditor(new MyCellEditor(tree, cellRenderer));
              } catch (Exception e) {
                   e.printStackTrace();
         private void btRemoveActionPerformed(ActionEvent evt) {
             TreePath path = tree.getSelectionPath();
             DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathComponent();
             ((DefaultTreeModel)tree.getModel()).removeNodeFromParent(selectedNode);
         private DefaultMutableTreeNode createNode() {
             DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Doc");
             DefaultMutableTreeNode ch1 = createChuongNode(rootNode, "Ch1");
             DefaultMutableTreeNode ch2 = createChuongNode(rootNode, "Ch2");
             createTextLeafNode(ch1, "title");
             return rootNode;
         private DefaultMutableTreeNode createChuongNode(DefaultMutableTreeNode parent, String name) {
             DefaultMutableTreeNode node = new DefaultMutableTreeNode(new ChapterNodeData(name));
             parent.add(node);
             return node;
         private DefaultMutableTreeNode createTextLeafNode(DefaultMutableTreeNode parent, String name) {
             DefaultMutableTreeNode node = new DefaultMutableTreeNode(new TitleNodeData(name));
             parent.add(node);
             return node;
          private class MyCellRenderer extends DefaultTreeCellRenderer {
                 ImageIcon titleIcon;
                 ImageIcon chapterIcon;
                 public MyCellRenderer() {
                     titleIcon = new ImageIcon(getClass().getClassLoader()
                            .getResource("description/ui/icons/Text16.gif"));
                     chapterIcon = new ImageIcon(getClass().getClassLoader()
                            .getResource("description/ui/icons/Element16.gif"));
                 public Component getTreeCellRendererComponent(
                                     JTree tree,
                                     Object value,
                                     boolean sel,
                                     boolean expanded,
                                     boolean leaf,
                                     int row,
                                     boolean hasFocus) {
                     super.getTreeCellRendererComponent(
                                     tree, value, sel,
                                     expanded, leaf, row,
                                     hasFocus);
                     if (isChapterNode(value)) {
                         setIcon(chapterIcon);
                         setToolTipText("chapter");
                     } else if (isTextLeafNode(value)) {
                         setIcon(titleIcon);
                         setToolTipText("title");
                     return this;
                 protected boolean isChapterNode(Object node) {
                     return ((DefaultMutableTreeNode)node).getUserObject() instanceof ChapterNodeData;
                 protected boolean isTextLeafNode(Object node) {
                     return ((DefaultMutableTreeNode)node).getUserObject() instanceof TitleNodeData;
          private class MyCellEditor extends DefaultTreeCellEditor {
                 ImageIcon titleIcon;
                 ImageIcon chapterIcon;
              public MyCellEditor(JTree tree, DefaultTreeCellRenderer renderer) {
                  super(tree, renderer);
                  titleIcon = new ImageIcon(getClass().getClassLoader()
                         .getResource("description/ui/icons/Text16.gif"));
                  titleIcon = new ImageIcon(getClass().getClassLoader()
                         .getResource("description/ui/icons/Element16.gif"));
              public Component getTreeCellEditorComponent(
                           JTree tree,
                           Object value,
                           boolean isSelected,
                           boolean expanded,
                           boolean leaf,
                           int row) {
                  super.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row);
                  return this.editingComponent;
          abstract class NodeData{
              String name;
              public NodeData(String name) {
                  this.name = name;
              public String getName() {
                  return name;
              public void setName(String name) {
                  this.name = name;
              public String toString() {
                  return name;
          class ChapterNodeData extends NodeData {
              public ChapterNodeData(String s) {
                  super(s);
          class TitleNodeData extends NodeData {
              public TitleNodeData(String attr) {
                  super(attr);
    }

    Arungeeth wrote:
    I know the name of the node... but i cant able to find that nodeHere is some sample code for searching and selecting a node:
        TreeModel model = jtemp.getModel();
        if (model != null) {
            Object root = model.getRoot();
            search(model, root, "Peter");//search for the name 'Peter'
            System.out.println(jtemp.getSelectionPath().getLastPathComponent());
        } else {
            System.out.println("Tree is empty.");
    private void search(TreeModel model, Object o, String argSearch) {
        int cc;
        cc = model.getChildCount(o);
        for (int i = 0; i < cc; i++) {
            DefaultMutableTreeNode child = (DefaultMutableTreeNode) model.getChild(o, i);
            if (model.isLeaf(child)) {
                TreeNode[] ar = child.getPath();
                String currentValue = Arrays.toString(ar);
                if (currentValue.contains(argSearch)) {
                    jtemp.setSelectionPath(new TreePath(ar));
            } else {
                search(model, child, argSearch);
    }

  • Selectively editing nodes in a JTree

    I need to make certain nodes in a JTree editable, without making every node in the tree editable. How can I accomplish this?

    Is there some kind of method in a JTree or a DefaultMutableTreeNode that I can call to select the node's text and be able to change it?Hmm. And you did read the API for JTree looking for such methods before you posted here, didn't you?
    So tell us which methods you found to be likely candidates.
    db

  • Editing in a JTree

    Hi!
    I would to edit on a JTree but my program doesn't work properly, the problem is that I don't know how many clicks I need to catch and assign a new name to the selected node. What I would like to do is with a double click to change the name of this node. I have also a pb with the track that I am exploring: the compiler jdk1.3 doesn't recognize CellEditor. If someone has already have this pb or can help me, thank you by advance.
    Maheva

    IconeNodeModification nodeModification = new IconeNodeModification();
    tree.setCellEditor(nodeModification);
    public class IconeNodeModification extends DefaultCellEditor {
    public boolean isCellEditable(EventObject evt) {
    if (evt instanceof MouseEvent) {
    MouseEvent e = (MouseEvent)evt;
    int cpt = e.getClickCount();
    if (cpt == 2) {
    return true
    return false;
    }

  • Is there possible to edit JTree cell but not by double click?

    Hi,
    I looked for few hours to solve that problem but couldnt find a good solution. I have JTree component a simple model, when I click on some button I would like to add a new item to my model and immidiately display editor in JTree's cell when new item was added to enter its custom unique name. Does an one know how to fire edit mode for cell?
    thanx and regards
    Adam

    The discussion in this thread from last week should get you started.
    [How can I add a node with with a user-chosen name to JTree in one action|http://forums.sun.com/thread.jspa?threadID=5325551]
    db

  • JTree: How to make few nodes editable

    I have a JTree which displays some complex expression.
    I want to make few nodes of the JTree editable and specify JCombobox as an editor. How can I do this?
    Any help or pointer?
    Thanks in advance
    Sachin

    I want to make few nodes of the JTree editablei'm not sure how you can do this - there is JTree.setPathEditable(boolean) but this means you'd have to subclass JTree ?
    you might be able to make a cell editor that returns some value to indicate a particular cell isn't editable, or failing that return a read-only component but I've not tried this..
    and specify JCombobox as an editor.this may help:
    http://www.cs.cf.ac.uk/Dave/HCI/HCI_Handout_CALLER/node156.html
    asjf

  • How to do SelectAll() when during JTree node edit?

    This question's been asked a few times but the answers haven't been very clear ( or the code that was posted was broken, etc. )
    I have a JTree -- when the user edits a node, I want to initially select all the text in the .that node.
    Does anyone have a SIMPLE, COMPLETE extension of a DefaultTreeCellEditor which does this? If so, please post. -- No fancy bells or whistles.
    Thanks much.

    ...well, there is a very easy, but not clean way to do it:
             * Configures the editor.  Passed onto the <code>realEditor</code>.
            public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) {
                DefaultTreeCellEditor.EditorContainer comp= (EditorContainer) super.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row);
                JTextField textField= (JTextField) comp.getComponent(0);
                textField.setSelectionStart(0);
                textField.setSelectionEnd(textField.getText().length());
                return comp;
            }This will work if you click the node twice and wait to call the editor, however most users will start editing a TreeNode by clicking multiplely on the node - as the Editor is a normal TextField, it will lose it's selection when being clicked upon. If this is a problem for you, just overwrite DefaultTreeCellEditor.DefaultTextField's processMouseEvent(MouseEvent) method and decide whether the click should remove the selection or not.
    I guess if you ask for a piece of code which will keep the text selected you have something special in mind to do with the editor, so sample code wouldn't do you much good here. Get back to me if you have trouble intercepting the mouse event.

Maybe you are looking for

  • I just cracked my ipad screen.  is that covered under warranty

    I just cracked up ipad screen.  Is that covered under the warranty?

  • Name not found  in Weblogic12c only when calling it fromTomcat7

    Hi, the scene is blow: my EJB3 is deployed in remote weblogic12c server . my web is deployed in my local tomcat7 . when I call the EJB by client , it will return the values. Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTE

  • Mail converts all attached images to bmp

    I need to send all my (attached) images as jpg or gif. but windows recipients complain they are receiving them as bmp files. i do have windows friendly setting activated. any ideas?

  • Look and feel master detail form

    Hello i have difficulties at the time of trying to decorate a master detail form i have 2 blocks one is the master and the other is the detail the question is can i change the text item of the master which are in the same tab canvas that the detail t

  • No activities have been posted

    Hi All, I am getting the following error message when i am calculating Actual price T.Code - KSII No activities have been posted Message no. KP254 Diagnosis No activity consumption was posted in controlling area 1400 in fiscal year 2009. System Respo