Can not highlight a JTree node programmatically

Hi Swing lovers,
I can select a node using setSelectionPath. Unfortunately I can not find a way to show the user that the node is selected. I know it can be done. When traversing the tree with the up- and down keyboard arrow, it shows what I want to see.
Am I overlooking some method here?
Thanks a lot for the tip,
Erik

Thanks DrClap,
I expected to find an easy way to mark a jTree node as being selected. However the TreeCellRenderer does the job. See the code snipped below:
public JTree jTree1 = new JTree();
private TreeNode currentNode = null;
//assing currentNode somewhere in you code
jTree1.setCellRenderer(new MyRenderer());
private class MyRenderer extends DefaultTreeCellRenderer {
    public MyRenderer() {
    public Component getTreeCellRendererComponent(
                            JTree tree,
                            Object value,
                            boolean sel,
                            boolean expanded,
                            boolean leaf,
                            int row,
                            boolean hasFocus) {
      if (currentNode != null) {
        if (value.hashCode() == currentNode.hashCode()) sel = true;
    super.getTreeCellRendererComponent(
                            tree, value, sel,
                            expanded, leaf, row,
                            hasFocus);
    return this;
/

Similar Messages

  • How to highlight a tree node programmatically

    Problem
    =====
    Just like a typical management software, I have a navigation tree presenting a list of objects (let's say toasters) on the left panel. The content panel on the right side presents the details of a toaster, when the user selects the toaster on the navigation tree. On the toaster details panel, I would like to have a hyper link referring to another toaster - associated to the selected toaster. On clicking on the hyperlink, I would like to display the details of the associated toaster and the navigation tree node for the associated toaster being highlighted.
    For example, BUI presents the following now:
    + Toasters | Toaster 1 Details [Refresh]
    + <toaster1> |
    + toaster2 | ... toaster3
    + toaster3 |
    toaster1 is selected on the navigation tree. The contents panel displays Toaster 1 details, which has a hyper link for toaster3.
    When the user click on toster3 on the contents panel, I would like to see the following
    + Toasters | Toaster 3 Details [Refresh]
    + toaster1 |
    + toaster2 | ...
    + <toaster3> |
    My Trial
    =====
    ADF Rich Client 11.1.2.3 is used for my development.
    Jspx code for the navigation tree looks like this:
    <af:tree id="navTree" ...>
    <f:facet name="nodeStamp">
    <af:panelGroupLayout id="nodePgl">
    <af:switcher facetName="#{stamp.outcome!=null?'actnode':'noactnode'}" ...>
    <f:facet name="actnode">
    <af:commandLink id="leafLink" text="#{stamp.label}" action="#{stamp.actionOutcome}">
    <af:setActionListener from="#{stamp.key}" to="#{treeHandler.selectedMenuItem}"/>
    </af:commandLink>
    </f:facet>
    <f:facet name="noactnode">
    <af:outputText id="notLeafText" value="#{stamp.label}"/>
    </f:facet>
    </af:switcher>
    </af:panelGroupLayout>
    </f:facet>
    </af:tree>
    The hyper link on the contents panel looks like this:
    <af:iterator var="toaster" value="#{toastData.toasters}">
    <af:commandLink text="#{toaster}" action="#{toasterHandler.goToToaster}">
    <f:param name="toasterId" value="#{toaster}"/>
    <af:setActionListener from="#{toaster}" to="#{treeHandler.selectedToaster}"/>
    </af:commandLink>
    </af:iterator>
    I got some tips from this forum (cannot find thread at the moment) and implemented the treeHandler.selectedToaster method as follows:
    // getSelectionState returns selStat, which is instantiated like the following:
    // RowKeySet selStat = new RowKeySetTreeImpl();
    // TreeModel model = (TreeModel) menuModel.getWrappedData();
    // selStat.setCollectionModel(model);
    // selStat.setContained(true);
    RowKeySet rowKeySet = getSelectionState();
    rowKeySet.removeAll();
    // synthesize the rowKey for the selected toaster
    // if the toaster found in the toaster node list,
    // rowKey should look like [0, <rowIdx of toaster>]
    ArrayList<Integer> rowKey = new ArrayList<Integer>();
    rowKey.add(0);
    rowKey.add(new Integer(rowIdx));
    TreeModel model = (TreeModel) menuModel.getWrappedData();
    model.setRowKey(rowKey);
    model.setRowIndex(rowIdx);
    rowKeySet.add();
    This seems to work most of times except when I refresh the contents details panel using partial page rendering.
    I get NullPointerException on the call to rowKeySet.removeAll().
    Caused by: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl._selectAll(RowKeySetTreeImpl.java:459)
         at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.removeAll(RowKeySetTreeImpl.java:146)
    In my observation, this NPE happens when rowKeySet.size() returns 1 but rowKeySet.iterator() does not return any entries.
    I suspect this is a bug on RowKeySetTreeImpl but not sure.
    Help Need
    =======
    1. What is the reasonably right way to highlight the tree node for my problem?
    2. If my trial is one way to do it, how can I get around the NPE? I cannot change ADF Rich Client library at this point.
    Any help/suggestion/advise would be appreciated.
    Thanks,
    Jeongtae

    I did this, to programmatically expand a tree node, you can try the same and set the row key to highlight.
    private RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();
    public void rowDisclosureListener(RowDisclosureEvent rowDisclosureEvent)
    Iterator added = rowDisclosureEvent.getAddedSet().iterator();
    if (added!=null)
    while (added.hasNext())
    Object rowKey = added.next();
    //disclosedTreeRowKeySet.clear();
    List path = (List)rowKey;
    for( int i=0; i< path.size(); i++ )
    List<Object> nodePath = new ArrayList<Object>();
    for( int j=0; j<i; j++ )
    nodePath.add( path.get( j ) );
    disclosedTreeRowKeySet.add( nodePath );
    disclosedTreeRowKeySet.add( rowKey );
    System.out.println( "disclosed Keys...... " + disclosedTreeRowKeySet );
    private void expandSelectedNode(RowKeySet addedObj) {
    if (sourceTreeTable != null) {
    Iterator added = (Iterator)addedObj.iterator();
    if (added!=null)
    while (added.hasNext())
    Object rowKey = added.next();
    List path = (List)rowKey;
    for( int i=0; i< path.size(); i++ )
    List<Object> nodePath = new ArrayList<Object>();
    for( int j=0; j<i; j++ )
    nodePath.add( path.get( j ) );
    disclosedTreeRowKeySet.add( nodePath );
    disclosedTreeRowKeySet.add( rowKey );
    sourceTreeTable.setDisclosedRowKeys(disclosedTreeRowKeySet);
    }

  • ADF Tree 10.1.3.1, not highlighting the selected node.

    Hi,
    I'm having a problem highlighting the selected node in the ADF CoreTree.
    I use the treehandler and model as described in the link: http://technology.amis.nl/blog/2116/much-faster-adf-faces-tree-using-a-pojo-as-cache-based-on-read-only-view-object-showing-proper-leaf-nodes-again
    I use this objects because my tree was showing leaf node with the image to collapse.
    The tree now looks great, the only problem is that when i click on a node the focusRowKey is set accordingly(debugging the getter and setter) but is not show as the selected node.
    The tree jspx code looks the follow:
                   <!--TREE-->
                                     <af:tree value="#{ActosTreeHandler.treemodel}" var="node"
                                               focusRowKey="#{ActosTreeHandler.focusRowKey}"
                                               id="treeActos"
                                               varStatus="nodeStatus" binding="#{ActosTreeHandler.jsfTree}">
                                        <f:facet name="nodeStamp">
                                          <af:commandLink text="#{node.description}" partialTriggers="treeActos"
                                                          action="#{backing_documentos_detalhesDocumento.treeAction}">
                                            <!--disabled="#{node.nodeType != 'ACTO'}"-->
                                            <af:setActionListener from="#{ActosTreeHandler.jsfTree.rowKey}"
                                                                  to="#{ActosTreeHandler.focusRowKey}"/>
                                            <af:setActionListener from="#{node}"
                                                                  to="#{ActosTreeHandler.selectedNode}"/>
                                            <af:resetActionListener/>
                                          </af:commandLink>
                                        </f:facet>
                                      </af:tree>Does anyone know how this can be solved?
    Best Regards.

    Hi,
    is this the same as
    Re: Facing a problem in programmatically setting focus on a node in <af:tre
    Frank

  • I can not configure the secondary node for shared appl_top

    when i run the perl -l txkSOHM.pl comand in the secondary node for shared appl_top. the system returns a "valid java executable not found"
    i did check all my environments variables, all is exactly just like the primary node.
    anybody can help me???

    $ perl -l txkSOHM.pl
    Absolute path of Application's Context XML file :
    /u01/oracle/snb2appl/admin/SNB2_pth1ap.xml
    Type of Instance [primary/secondary] :
    secondary
    Absolute path of 8.0.6 Shared Oracle Home :
    /u03/oracle/snb2ora/8.0.6
    Absolute path of iAS Shared Oracle Home :
    /u03/oracle/snb2ora/iAS
    Absolute path of config top :
    /u03/oracle/PTH1
    Oracle Application apps schema password :
    pu3rt0
    *** USER FEEDBACK ***
    Absolute path of Application's Context XML file : /u01/oracle/snb2appl/admin/SNB2_pth1ap.xml
    Type of Instance [primary/secondary] : secondary
    Absolute path of Shared Oracle Home top :
    Absolute path of 8.0.6 Shared Oracle Home : /u03/oracle/snb2ora/8.0.6
    Absolute path of iAS Shared Oracle Home : /u03/oracle/snb2ora/iAS
    Absolute path of config top : /u03/oracle/PTH1
    Run AutoConfig [y/n] : y
    Oracle Application apps schema password : pu3rt0
    Absolute path of the log file : /u02/oracle/pth1comn/admin/log/SNB2_pth1ap/txkSetSOHM.log
    Prompt for confirmation [y/n] : n
    Absolute path of 8.0.6 config Home : /u03/oracle/PTH1/8.0.6
    Absolute path of iAS config Home : /u03/oracle/PTH1/iAS
    Application's Context file Saved as : /u01/oracle/snb2appl/admin/SNB2_pth1ap.xml.SOH
    Valid java executable not found

  • I can not open my iPhoto Library in iPhoto or Aperture

    Hi,
    I am running iPhoto 9.4.3 and Aperture  3.4.5. I first had all my pictures in iPhoto, but swithced to Aperture a few years back, importing my iPhoto library to Aperture, and in the process I moved the library to an external harddrive.
    Now I have rebooted my old iMac 2008 (OS X 10.8.5) and am attempting to start using iPhoto again, with the old library, but when I open iPhoto and try to choose which library to use, the only to librarys I can choose from are the new Aperture and iPhoto libraries that come with the program. I can see my old library on the external harddrive, but I can not highlight it. I have tried to open the library in Aperture also, but have the same problem there.
    What am I doing wrong?

    Ok, I had a closer look under diskutility... My EHD is showing on 2 lines... the top line says:
    3TB WE My Book 1130... Format: Mac OS Extended
    But the lower line says:
    MY BOOK ...Format MS-DOS (FAT)
    And when I go into Finder and click "Show info" on MY BOOK, it also says MS-DOS... so I must have done something wrong when I formatted the disk.... Can you help?

  • Can not completely delete a Metaset

    we are configuring a Solairs Cluster 3.2, and someone deleted a metaset incorrectly, now we have the follwoing situation:
    metaset does not show it
    cldg shows it
    it is still in the ccr
    it can not be deleted or purged (with metaset -P or -C purge)
    it can not be recreated
    root@NodeA # metaset  -s metaset01
    metaset: NodeA: setname "metaset01": no such set
    ## Repeeated on NodeB, same result
    root@NodeA # cldg show metaset01
    === Device Groups ===
    Device Group Name:                              metaset01
      Type:                                            SVM
      failback:                                        false
      Node List:                                       NodeA, NodeB
      preferenced:                                     true
      numsecondaries:                                  1
      diskset name:                                    metaset01
    root@NodeA # metaset
    Set name = metaset02, Set number = 2
    Host                Owner
      NodeA
      NodeB
    root@NodeA # metaset -s metaset01 -a -h NodeA NodeB
    sc_rval = 2
    metaset: NodeA: setname "metaset01": no such setAny idea on how to purge this metaset out of the ccr?
    Fritz

    If this is a production cluster, please call Sun support. If it was installed by them, you should have the SUNWscdtk package installed which should allow you to remove it using dcs_config (I think).
    If it is just a cluster to play with (i.e. dev, test... basically unimportant if you mess it up), then you could 'hack' the ccr and remove the offending metaset. You'd need to boot the nodes in non-cluster mode (-x) and then go to the /etc/cluster/ccr directory and find all files with reference to the set. Some will just need a line removing (directory, IIRC), others will need to be removed completely (dcs_XXX). You will need to rechecksum these files using 'ccradm -i <file> -o' then boot into cluster mode again.
    I would recommend backing up the /etc/cluster/ccr directory just in case it all goes pear shaped!
    Remember, this is just for non-production clusters.
    Tim
    ---

  • JTree Node highlight

    Hi All
    I am using Drag and Drop for JTree.
    I want to highlight the target node(make the text bold) when drag is started and the cursor is over a target node. I tried retrieving the renderer. But could not succeed. Can anyone help me out...
    Thanks in advance

    Am I not clear?

  • How can i change the particular node color in Jtree?

    I have constructed the tree.i dont know how to set the color for the particular node then how can i change the particular node icon depends on some conditions like if we will give the input whether it is available in jtree that node icon only changed.Anyone please help me as soon as possible.

    hi,
    i saw that tutorial.from that book i dont get the particular node cell renderer.i got a cell renderer for tree only.i attached my code in this mail.pls see and help me if u will do
    mport pack.Prop;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Font;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import java.util.Set;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.text.Position;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class ReadProperty3 extends JFrame{
    String str,key;
    static JTree tree;
    static Vector v;
    StringTokenizer st;
    static DefaultMutableTreeNode root;
    DefaultMutableTreeNode t;     
    public Object[] o;
    public static void main(String[] args) throws IOException {
    ReadProperty3 r = new ReadProperty3();
    Prop p=new Prop();
    JFrame f=new JFrame();
    p.show();
    Object[] o=v.toArray();
    int startRow = 0;
    String prefix =p.s;
    TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
    //if(prefix.equals(root.getChildAt(0).toString()))
    if(prefix.equals("2000"))
         System.out.println("Node 2000 found");
         else if(prefix.equals("3000"))
              System.out.println("Node 3000 found");
         else if(prefix.equals("4000"))
              System.out.println("Node 4000 found");
         else
              System.out.println("Node not found");
         for(int i=0;i<v.size();i++)
              //((DefaultTreeModel)tree.getModel()).reload();
              DefaultTreeCellRenderer ren=(DefaultTreeCellRenderer)tree.getCellRenderer();
              Icon openIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon closedIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon leafIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/read.gif");
              if(o[0].equals(p.s))
                   ren.setBackgroundSelectionColor(Color.MAGENTA);
                   ren.setBackgroundNonSelectionColor(Color.YELLOW);
                   //ren.setTextSelectionColor(Color.YELLOW);
                   //ren.setTextNonSelectionColor(Color.BLUE);
                   ren.setClosedIcon(closedIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,14));
              else if(o[1].equals(p.s))
                   ren.setLeafIcon(leafIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,10));
                   UIManager.put("Tree.leafIcon", leafIcon);
              else if(o[2].equals(p.s))
                   ren.setOpenIcon(openIcon);
                   ren.setFont(new Font("Dialog",Font.BOLD,9));
    public ReadProperty3(){
         super("JTree With Properties");
         try{
    int c = 0;
    while(c == 0){
    c = 1;
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter file name which has properties extension :");
    str = bf.readLine();
    File f = new File(str + ".properties");
    if(f.exists()){
    Properties pro = new Properties();
    FileInputStream in = new FileInputStream(f);
    pro.load(in);
    System.out.println("Key: " + pro.keySet());
    System.out.print("Enter Key : ");
    key = bf.readLine();
    String p = pro.getProperty(key);
    st = new StringTokenizer(p,"=,");
    root=new DefaultMutableTreeNode(key);
    v=new Vector();
    while(st.hasMoreTokens())
         String val=st.nextToken();
         v.add(val);
         o=v.toArray();
         System.out.println(val);
         t=new DefaultMutableTreeNode(val);
         root.add(t);
         tree=new JTree(root);
         tree.setEditable(true);
         JScrollPane jp=new JScrollPane(tree);
         // tree.setCellRenderer(new CellRenderer());
         Container content=getContentPane();
         content.add(jp,BorderLayout.CENTER);
    setSize(250,275);
    setVisible(true);
    addWindowListener(new ExitListener());
    else{
    c = 0;
    System.out.println("File not found!");
    catch(IOException e){
    System.out.println(e.getMessage());
    }

  • E mail. I can not send email to a contact from my list. When I hit their email address, the new message box comes up but the send icon is not highlighted and I can not send it. Why? How do I fix it. Happens on both I pad Air 2 and I Phone 5

    WWhen I press the email of a contact, the new message box appears with the address but the send icon is not highlighted. Even after typing a message, I can not send it. This is on both I Phone 5 and I Pad Air 2. this just started and not sure what I did. Help please?

    Read this thread, it's a bug that many are experiencing:
    Cannot send emails from contacts

  • How can i print double sided from my macbook? The option is not highlighted., how can i print double sided from my macbook? The option is not highlighted.

    How can I print double sided from my MacBook? The option is not highlighted,
    shazmina2

    This function is related to the printer driver and the printer you use. If you do not give details, nobody can suggest a solution. Usually, the correct driver solves the issue.

  • I have Firefox 6.0 running under Windows XL. When I forward an email with a URL in it, my recipients tell me the URL is not highlighted and they have to cut and paste it into their browser. Why? How can I get my forwarded URLs to be highlighted?

    I have Firefox 6.0 running under Windows XL. When I forward an email with a URL in it, my recipients tell me the URL is not highlighted and they have to cut and paste it into their browser. Why? How can I get my forwarded URLs to be highlighted?

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Wanted to put a file via a drag and drop into applications on my finder sidebar.  it missed and landed in the sidebar itself.  i can not remove it.  i can not even highlight it.  how can i remove it from the sidebar.

    I wanted to put a file via a drag and drop into applications on my finder sidebar.  it missed and landed in the sidebar itself.  i can not remove it.  i can not even highlight it.  how can i remove it from the sidebar.

    Try holding down the Command key and dragging the file well off the sidebar.
    Hope this helps.

  • "View Film Rolls" is not Highlighted.... how can I get to it? (iPhoto 6)

    "View Film Rolls" is not Highlighted.... how can I get to it? (iPhoto 6)

    Since you're using the term Rolls you must be running iPhoto 6 or earlier. For future problems be sure you post in the iPhoto 6 or forum.
    For this problem the View File rolls will only Be sure you're clicked on the Library. That menu item is not available in an album or other item. If you have clicked the library icon first and it's still grayed out close iPhoto, delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder and then try again.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • I can not start a remote server via Node Manager

     

    There is a workaround to this problem. The issue seems to be
    that when the node manager tries to start the managed server
    it can not find java.exe in the system path. So please go to
    Control Panel->System->...->Environment, and modify your PATH
    system environment variable to include the java bin directory
    in it.
    Then try using the node manager again to start the managed
    servers and you should have no problems.
    We are aware of the issue and working on having a fix for it.
    Savvas
    "Rakesh Chauhan" <[email protected]> wrote:
    >
    Hey Guys!
    I am using WLS6.1 on WIN2000 boxes. And I am getting the same error on
    the Admin
    console when I try to start any of the two
    managed servers.
    <Sep 25,2001 1:39:12 PM EDT> <Info> <[email protected]:7002><WindowsProcessControl:
    online successfully invoked on server 'server90', pid: 0> The interesting thing is that when I start managed server of its own,
    it is started
    successfully and you can Stop the managed
    server from the Admin Console.
    Really frusted, I hope I have configured everything correctly. Can somebody
    help
    me out ?
    Thanks Rakesh
    "Martin Matthews" <[email protected]> wrote:
    This message is simply a message from the Admin Server saying that it
    has asked
    NodeManager on the remote machine to start a certain server.
    To see the logs for server startup then you can find these either on
    the Admin
    machine at WL_HOME/config/NodeManagerClientLogs/<ManagedServerName>/*.log
    or on the remote machine at
    WL_HOME/config/NodeManagerLogs/<ManagedServerName>/*.log
    Cheers
    Martin
    "Paul Nixon" <[email protected]> wrote:
    I also would like to know the answer to the question below from Vincent.
    I am getting
    this message in the Admin console from either of my two managed servers
    whenever
    the console has successfully contacted the Node Manager in managed
    server
    host.
    The Node Manager logs themselves also report "online successful". What
    doesn't
    seem to happen is WebLogic startup and I haven't found any error log
    that explains
    why.
    I have set the Remote Startup parameters correctly [I think] for both
    managed
    servers so cannot see what further is required.
    Any input appreciated.
    Paul.
    "Vincent Ducret" <[email protected]> wrote:
    Hi everybody,
    When I try to start a remote WLS 6.1 server from my computer, I receive
    the message
    below in my WLS administration console. The Node manager is runningon
    the remote
    machine and correctly configured, I hope!
    What does this message mean ???
    Thanks for your help
    Vincent
    <21 août 01 10:19:17 CEST> <Info> <[email protected]:5555>
    <WindowsProcessControl:
    online successfully invoked on server 'testserver', pid: 0>

  • Xml in JTree: how to not collpase JTree node, when renaming XML Node.

    Hi.
    I'm writing some kind of XML editor. I want to view my XML document in JTree and make user able to edit contents of XML. I made my own TreeModel for JTree, which straight accesses XML DOM, produced by Xerces. Using DOM Events, I made good-looking JTree updates without collapsing JTree on inserting or removing XML nodes.
    But there is a problem. I need to produce to user some method of renaming nodes. As I know, there is no way to rename node in w3c DOM. So I create new one with new name and copy all children and attributes to it. But in this way I got a new object of XML Node instead of renamed one. And I need to initiate rebuilding (treeStructureChanged event) of JTree structure. Renamed node collapses. If I use treeNodesChanged event (no rebuilding, just changes string view of JTree node), then when I try to operate with renamed node again, exception will be throwed.
    Is there some way to rename nodes in my program without collpasing JTree?
    I'am new to Java. Maybe there is a method in Xerces DOM implementation to rename nodes without recreating?
    Thanks in advance.

    I assume that "rename" means to change the element name? Anyway your question seems to be "When I add a node to a JTree, how do I make sure it is expanded?" This is completely concerned with Swing, so it might have been better to post it in the Swing forum, but if it were me I would do this:
    1. Copy the XML document into a JTree.
    2. Allow the user to edit the document. Don't attempt to keep an XML document or DOM synchronized with the contents of the JTree.
    3. On request of the user, copy the JTree back to a new XML document.
    This way you can "rename" things to the user's heart's content without having the problem you described.

Maybe you are looking for

  • Mass chnage Commitment Item in GL account FS00

    Hi,   I wan to add commitment items for GL account  there are 1000 GL accounts for each 250  we have different commitment items  is it possible to do mass change  without BDC, can i use OB_GLACC12 but i have not found the filed commitment items for c

  • Opening PDF files on a new Mac Pro

    I'm running Leopard X.5.7 and updated to the latest Adobe Reader. However, trying to open some PDF files including my Mac Pro Manual offers the pop-up, "You can't open the application because it is not supported on this architecture." If I use "Quick

  • Reports empty SCSM 2012 SP1

    Hello i have integrated  the component of datawahrehouse SCSM 2012 with my management server. But when i try to generate a report of list of inccident for example , it display me an empty report , i have tried to change some parameter (date , timezon

  • CSV Export Problems

    Hi All An end user of my application has had problems exporting reports in csv format. She gets the error Cannot copy file: Cannot read from the source file or disk I have not been able to replicate this issue as I have no problems outputting the dat

  • Problem starting Design Console

    I get this error when starting the OIM design console Error Keyword: DAE.CLIENT_NOT_BOUND Description: Database client has not bound to the server-side database object. Either the client database object has never bound to the server-side database obj