Jtree Select node and change leafs icon problem

Hi All,
i create a tree and implement a TreeSelectionListener:
my mission is whenever i select a node i need to change the icon of this node (for now.later i will have to find if it have childrens).
import java.awt.Color;
import java.awt.Component;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import java.util.Vector;
import javax.swing.ImageIcon;
import javax.swing.JTree;
import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
public class TreeView{
     DefaultMutableTreeNode top;
     JTree tree ;
     Color frameColor;
     public static ImageIcon NoTSelIcon;
     public static ImageIcon SelIcon;
    public static String[] name= new String[8];
     public TreeView(Color BackColor) {
          // TODO Auto-generated constructor stub
        top =  new DefaultMutableTreeNode("Diagnostics");
        this.frameColor=BackColor;
         SelIcon = createImageIcon("../Resource/Images/Select.gif");
         if (SelIcon == null)
             System.err.println("Tutorial icon missing; using default.");
         NoTSelIcon = createImageIcon("../Resource/Images/NotSelc.gif");
           if (NoTSelIcon == null)
             System.err.println("Tutorial icon missing; using default.");
     public Component createTreeComponents(){
            //Create the nodes.
             createNodes(top);
        //Create a tree that allows one selection at a time.
        tree = new JTree(top);
        //TREE LISTENERS
        //Treeselction listener
        Handler hObject = new Handler();
        tree.addTreeSelectionListener(hObject);
       //Tree expand/collapse listener
        HandlerExpansionListener hObjectExpan = new HandlerExpansionListener();
        tree.addTreeExpansionListener(hObjectExpan);
//       tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
        //set tree background
        tree.setBackground(frameColor);
         tree.setCellRenderer(new OverrideTreeCellRenderer(frameColor,SelIcon,NoTSelIcon));
        return tree;
      private void createNodes(DefaultMutableTreeNode top) {
             DefaultMutableTreeNode category = null;
             DefaultMutableTreeNode SubCategory = null;
             DefaultMutableTreeNode SubCategoryBasee = null;
             DefaultMutableTreeNode SubSubCategoryBasee = null;
             category = new DefaultMutableTreeNode("Dfe");
             top.add(category);
             //Sub test visible
             SubCategory = new DefaultMutableTreeNode("Test Visible");
             category.add(SubCategory);
             SubCategory.add(new DefaultMutableTreeNode("Son 1"));
             SubCategory.add(new DefaultMutableTreeNode("Son 2"));
             SubSubCategoryBasee = new DefaultMutableTreeNode("Test Base");
             SubSubCategoryBasee.add(new DefaultMutableTreeNode("Grandson 1"));
             SubSubCategoryBasee.add(new DefaultMutableTreeNode("Grandson 2"));
             SubCategory.add(SubSubCategoryBasee);
      class Handler implements TreeSelectionListener {
               public void valueChanged(TreeSelectionEvent arg0) {
                    // TODO Auto-generated method stub
                    System.out.println("treeSelect event ");
                    TreePath trph;
                    trph=arg0.getNewLeadSelectionPath();
                    int count=trph.getPathCount();
                    DefaultMutableTreeNode Selnode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
                    String Name = (String)Selnode.getUserObject();
                    setSelected(Selnode,true);
                    int number_ofnodes=getNodeCountBelow((TreeModel)tree.getModel() , Selnode, false);
                    System.out.println("The Number of nodes under "+Name+"="+number_ofnodes);
                    tree.setCellRenderer(new IconRenderer(SelIcon,NoTSelIcon,frameColor));
      class HandlerExpansionListener implements TreeExpansionListener {
               public void valueChanged(TreeSelectionEvent arg0) {
                    // TODO Auto-generated method stub
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode)  tree.getLastSelectedPathComponent();
                    if (node == null) return;
                  }     // The inner class
               public void treeCollapsed(TreeExpansionEvent arg0) {
                    // TODO Auto-generated method stub
                    System.out.println("treeCollapsed event ");
               public void treeExpanded(TreeExpansionEvent arg0) {
                    // TODO Auto-generated method stub
                    System.out.println("treeExpanded event ");
      /** Returns an ImageIcon, or null if the path was invalid. */
         protected static ImageIcon createImageIcon(String path) {
              //ImageIcon imcon= new ImageIcon(path);
              //return imcon;
             java.net.URL imgURL = TreeView.class.getResource(path);
             if (imgURL != null) {
                 return new ImageIcon(imgURL);
             } else {
                 System.err.println("Couldn't find file: " + path);
                 return null;
         DefaultMutableTreeNode newnode;
         public void setSelected(DefaultMutableTreeNode Selnode ,boolean isSelected)
                Enumeration Enchilds=Selnode.children();//ENUMRATE ALL CHILDS FOR THIS NODE
             if (Enchilds != null)
                  while (Enchilds.hasMoreElements())
                       newnode=(DefaultMutableTreeNode)Enchilds.nextElement();
                       String NameSel = (String)newnode.getUserObject();
                       setSelected(newnode,isSelected);
         //GETTING THE TREE DEPTH
         public int getNodeCountBelow(TreeModel model, Object node, boolean includeInitialNode)
             int n = includeInitialNode ? 1 : 0;
             for (int i = 0; i < model.getChildCount(node); i ++)
                 n += getNodeCountBelow(model, model.getChild(node, i), true);
             return n;
import java.awt.Color;
import java.awt.Component;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import javax.swing.Icon;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
public class IconRenderer extends DefaultTreeCellRenderer {
     private static final long serialVersionUID = 1L;
     Icon SelectedIcon;
     Icon NotSelectedIcon;
     Color BackgroundColor;
     boolean Selected=false;
     boolean Leaf=false;
     boolean IsItaChild=false;
     DefaultMutableTreeNode SelctedNode=null;
    public IconRenderer(Icon SelIcon,Icon NoTSelIcon,Color Bacground) {
         SelectedIcon = SelIcon;
         NotSelectedIcon = NoTSelIcon;
         BackgroundColor=Bacground;
         setBackgroundNonSelectionColor(BackgroundColor);
    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);
         Selected=sel;
         Leaf=leaf;
         DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
         String s2 = (String)node.getUserObject();
   return this;
}my problem is :
when i select a node the the method "getTreeCellRendererComponent"
start to run on the entire tree from buttom to top and than from top to buttom.
for me it waste of time because if has say 100 nodes it wont botthers me.
but i have 20000 nodes and more its take a time.
and for all this nodes i have to make compares.
is there a way to force the DefaultTreeCellRenderer to not run the entire tree???
Thanks

You need to make sure that your TreeModel interprets your group nodes to be non-leaf nodes (one of the methods in the TreeModel interface is called isLeaf). If you are using a DefaultTreeModel with DefaultMutableTreeNode objects, you can use the askAllowsChildren property of DefaultTreeModel and the allowsChildren property of DefaultMutableTreeNode to control this. See the API for more details:
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/tree/DefaultTreeModel.html
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/tree/DefaultMutableTreeNode.html

Similar Messages

  • TreeView - Expand only selected node and collapse others

    Hi
    How I can expand only selected node and collapse other nodes that was expanded earlier?!

    Ghostenigma,
    switch Option Strict On. I've tried to analyze the code but it's not usable due to type ignorance.
    BTW, Goto is not required here. ELSEif means it's only executed if the previous expressions are not true.
    Armin
    Ignore other code and give an reply for what I've asked else you are not obligated to post a reply at all!
     I am not sure if you took the "type ignorance" part wrong but, Armin was only trying to give you helpful information which i would give too.  Option Strict is a GOOD thing to use and the GoTo statements are not needed inside your ElseIf
    statements.  As far as that goes, i would not recommend using GoTo in any modern .Net programming.
     Anyways, the problem is with the way you are Adding and Removing all the child nodes every time the nodes are DoubleClicked and when they are Collapsing.  I just simulated your code to add the sub nodes when a main node is double clicked. 
    You can just use the NodeMouseDoubleClick event instead of the TreeView`s DoubleClick event to make it a little easier on yourself too.
     This corrected the problem for me.
    Public Class Form1
    Private r As New Random ' this random class is only for my simulation of adding sub nodes (not needed)
    Private expanded As TreeNode
    Private Sub TreeView1_BeforeCollapse(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeCollapse
    e.Node.Nodes.Clear()
    End Sub
    Private Sub TreeView1_BeforeExpand(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeExpand
    Dim pn As TreeNode = e.Node
    While pn.Parent IsNot Nothing
    pn = pn.Parent
    End While
    If expanded IsNot Nothing And expanded IsNot pn Then expanded.Collapse()
    expanded = pn
    End Sub
    Private Sub TreeView1_NodeMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseDoubleClick
    'Added this part to collapse the prior expanded node and set the (expanded) node to the new one
    If expanded IsNot Nothing And expanded IsNot e.Node Then
    expanded.Collapse()
    Dim pn As TreeNode = e.Node
    While pn.Parent IsNot Nothing
    pn = pn.Parent
    End While
    expanded = pn
    End If
    'This just simulates your code to add the new sub nodes to the main node that was double clicked
    'you need to put your code here instead of this.
    Dim str() As String = {"one.mp3", "Two.mp4", "Three.mvk"}
    Dim s As String = str(r.Next(0, 3))
    e.Node.Nodes.Add(s, s)
    e.Node.Expand()
    End Sub
    End Class
     PS - I notice you are adding more and more Images to your ImageList every time you double click on a node.  If you just add the Images to it once when the app is loading then you can just use the Image Key to set the correct Image to the newly
    added node.
    If you say it can`t be done then i`ll try it

  • XSD get all node and all leaf of all node URGENT please!

    I am want write a java program that will parse an xml schema and obtain all nodes and all leaf of all nodes
    samebody can help me?

    i use this, but i can only can print this:
    /quotazione
    /quotazione/ORG_ID
    /quotazione/CUSTOMER_ID
    /quotazione/quot
    /quotazione/customer
    but the schema is:
    <xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    xdb:storeVarrayAsTable="true">
         <xs:element name="quotazione" type="quotaioneType" xdb:defaultTable="QUOTAZIONE"/>
         <xs:complexType name="quotaioneType" xdb:SQLType="QUOTAZIONE_T">
              <xs:sequence>
                   <xs:element name="ORG_ID" type="xs:integer" xdb:SQLName="ORG_ID"/>
                   <xs:element name="CUSTOMER_ID" type="xs:integer" xdb:SQLName="CUSTOMER_ID"/>
                   <xs:element name="quot" type="quotType" xdb:SQLName="QUOT"/>
                   <xs:element name="customer" type="customerType" xdb:SQLName="CUTOMER"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="quotType" xdb:SQLType="QUOT_T">
              <xs:sequence>
                   <xs:element name="QUOTATION_ID" type="xs:integer" xdb:SQLName="QUOTATION_ID"/>
                   <xs:element name="STATUS" type="xs:string" xdb:SQLName="STATUS"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="customerType" xdb:SQLType="CUSTOMER_T">
              <xs:sequence>     
                   <xs:element name="TITLE_CODE" type="xs:string" xdb:SQLName="TITLE_CODE"/>
                   <xs:element name="CUSTOMER_NAME" type="xs:string" xdb:SQLName="CUSTOMER_NAME"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    the java class is:
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              XMLSchema schemadoc=null;;
              XSDBuilder builder;
              URL url;
              int i=0;
              try{
                   builder = new XSDBuilder();          
                   url = new URL("file://c:\\quotazione.xsd");               
                   schemadoc = (XMLSchema)builder.build(url);
              }catch(Exception ex){
                   System.out.println("Errore file xsd--");
              //si prende lo schema
                   String[] NS = schemadoc.getAllTargetNS();
                   XMLSchemaNode Nodo = new XMLSchemaNode();//nodi schema
                   XSDNode[] uno;     
                   XSDNode[] childElements;
                   Nodo = schemadoc.getSchemaByTargetNS(NS[ i ]);
                   uno = Nodo.getElementSet();
                   XSDElement elem = schemadoc.getElement(NS, uno[0].getName());
                   childElements = elem.getChildElements();
                   System.out.println("/"+uno[0].getName());
                   for (i=0;i<childElements.length;i++){
                             System.out.println("/"+uno[0].getName()+"/"+childElements[i].getName());
    can somebody help me abount print the children of /quotazione/quot/ for example?

  • How to change leaf icon in jtree

    Hi,
    I have one treeviewer class in which i have set the leaf icon like
    renderer1.setLeafIcon(new ImageIcon(RMViewer.getApplication().getIconImageManager().getImage("TRMA")));
    it's working fine..i have one more class namely IntFrame....there i have one button which display some doc...now when i click on button i wanna change only selected leaf icon not other leaf icon...
    how do i proceed...can u provide me some examples
    regards
    Tarique

    Can u provide me the some source code...
    i m not able to do this..
    Regards
    Tarique

  • How can i loop over treeview selected nodes and then to delete each node if it's a directory or a file ?

    I have this code:
    if (s == "file")
    file = false;
    for (int i = 0; i < treeViewMS1.SelectedNodes.Count; i++)
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    I know it's a file and it is working if it's a single file.
    On the treeView i click on a file right click in the menu i select delete and it's doing the line:
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    And it's working no problems.
    But i want to do that if i selected some files togeather multiple selection then to delete each file.
    So i added the FOR loop but then how do i delete from the SelectedNodes each node ?
    The treeView SelectedNodes dosen't have FullPath like SelectedNode also doing SelectedNodes[i] dosen't have the FullPath property.
    Same as for if i want to delete a single directory or multiple selected directories:
    This is the continue of the code if it"s not a "file" (else) it's null i know it's a directory and doing:
    else
    file = true;
    RemoveDirectoriesRecursive(treeViewMS1.SelectedNode, treeViewMS1.SelectedNode.FullPath);
    Also here i'm using SelectedNode but if i marked multiple directories then i how do i loop over the SelectedNodes and send each SelectedNode to the RemoveDirectoriesRecrusive method ?
    My problem is how to loop over SelectedNode(multiple selection of files/directories) and send each selected file/directory to it's method like i'm doing now ?

    foreach (TreeNode n in treeViewMS1.SelectedNodes)
    // Remove everything associated with TreeNode n here
    I don't think it's any harder than that, is it?
    If you can multi-select both an item and one of its descendents in the tree, then you'll have the situation that you may have deleted the parent folder and all of its children by the time you get around to deleting the descendent.  But that's not such
    a big deal.  A file can get deleted externally to your program too - so you'll just have to deal with it having been deleted already (or externally) when you get around to deleting it yourself.

  • Javascript, IllustratorCS3, select items and change layers

    Hi
    I am trying to select an object defined with fill color Cyan and move that object to another layer. Is there any way to do this with JavaScript? Could you please help.
    PS: I want script to select that object, not the user.
    Thanks
    Sel KAHRAMAN

    Thanks for your reply Yann,
    I already know how to change the texts, the problem is that the texts I would like to change:
    To select old purchase orders or templates, choose
    Then select items and add them to the shopping cart 
    Are not in the list of attributes/texts...
    Where can this text be located?
    I find it hard to believe that it is hardcoded...

  • JTree select Node

    Is there any method available to select a node by its path in JTree. I have to pass the argument as string type and see the node gets selected. Help !!!!

    well, if you have the node and are using DefaultTreeModel, you can call: getPathToRoot(TreeNode)
    Not sure how to find the node from the value except to just loop thru the entire tree... or maintain a separate table of value/node objects.

  • JTree - Create nodes and expand

    Hi there,
    I have made a file-tree from the swing jtree, where My Computer is the root, then C:/ etc, Program Files, etc...
    The problem I'm having is that I'm trying to open up a node if a link has been clicked. For example.. if A shortcut to C:/Program Files/Pictures/pic.jpg was clicked, then it should go the C:/ node, create it's children, and expand it, go to Program Files node, create it's children and expand it, etc until pic.jpg is visible.
    TreePath x = new TreePath(ta);
    TreePath y = x.pathByAddingChild(myComputer);
    TreePath z = y.pathByAddingChild(programFiles);
    tree.expandPath(y);
    The above is the general idea of what I'm trying... I can't see why this doesn't work. (ta is empty root folder, then myComputer and programFiles are other treenodes).
    Any ideas?
    Thanks.
    David

    Create your TreeModel using the FileSystem as the underlying data store, as shown in this article:
    http://java.sun.com/products/jfc/tsc/articles/jtree/
    The use JTree#setAnchorSelectionPath when the user clicks on a file to select that item in the tree. Also look at JTree#scrollPathToVisible if your JTree is in a scroll pane.

  • I want to assign and change bookmark icons on my bookmark toolbar

    Some websites automatically assign an icon when I add them to my bookmark bar. For brevity sake, I delete the description so I can have more bookmarks lined up across the top of the browser page. Other websites do not generate an icon (its an icon of a blank page, a generic default setting I suppose). I want to be able to assign an icon for my bookmarks that do not have a unique icon.

    If you want to have a less crowded Bookmarks Toolbar then I don't think that you can assign icons.
    However you can create folders to put bookmarks in. That way, you can still put in a description if you want to, without having to give up Toolbar space. To create a folder:
    1. Right-click the Toolbar
    2. Select the 'New Folder...' option (near the top)
    3. Fill in the name (and description if you wish)
    4. Click 'Add'
    * You can now add bookmarks to that folder by draging and droping them onto it
    * You can edit a folder by right-clicking on it and selecting 'Properties...', changing it to how you want it and clicking 'Save'
    '''If this was the answer you were looking for, please click 'Solved' -- Thanks.'''

  • HT4623 Hi I'm new to ipad. I know I have downloaded from the App Store sky go, iplayer, itv player, 4OD etc but when I want to watch them I cannot watch. In the App Store I cannot select 'free' and the app icons are not on my screens. Please help

    Hi
    I'll write here too as this is the first time I've done this too. I'm new to ipad and I'm having trouble with icons appearing on my ipad after I have downloaded them. These are all tv based -sky go app, iplayers and on demand. I have installed them previously but since then there are no icons on my ipad to select. When I follow the link to the App Store to download, the 'free' tab or the price tab cannot be selected. Please help

    Hi there,
    Thank you so much. I said I was new to ipad lol. I put restrictions on about a month ago and have been ripping my hair out since. Wish I asked on here first lol. Are there any simple steps of advice you could offer or maybe an idiots guide lol
    Thanks again and best wishes..
    Kesfensome

  • [solved] DWM and Volti tray icon problem....

    I have a problem with the tray icon of dwm.
    I set up Faenza dark as icon theme, and all the tray appear white (correctly). Only the volti icons appear black and  I not understand why.
    Everyone can help me?
    Thanks.
    Last edited by monotiz (2011-03-03 11:53:49)

    monotiz wrote:
    I have a problem with the tray icon of dwm.
    I set up Faenza dark as icon theme, and all the tray appear white (correctly). Only the volti icons appear black and  I not understand why.
    Everyone can help me?
    Thanks.
    What you use for system tray in dwm?

  • Tilting, Volume Buttons and Sound Effects icon problem.

    Every time I tilt my iPad while using it on a flat surface the volume button is contacted and the Sound Effects icon appears.  This is a very poor design in my opinion.  It drives me crazy!!  Any workarounds?

        knothead997cdp - I know that with the iPhone, they say there is an app for everything, but causing you headaches isn't one of them! Judging from the multiple issues you are describing, the master reset is definitely the best course of action to take. You may always stop by at your closest Apple Store for a second opinion. In all honesty, it just sounds like the update went corrupt somewhere. Starting clean should take care of it!
    Let us know how it goes. If you have any additional questions, please do not hesitate to reach out to us!
    Thank you knothead997cdp, take care!
    NicandroN_VZW
    Follow us on Twitter @vzwsupport

  • Ffmpeg and change the codec problem

    Hi I would like to use System Exec.vi with ffmpeg commands to convert a wave file from ADPCM to PCM but whatever command I give to System Exec.vi I get nothing. Could you please help me on this matter.
    Attached is the vi. This vi is used to convert a wave file to pcm file . This one is also not working at all  and I get 1 as return value when I enable wait until completion and 0 when I disable it
    the command I used is 
    ffmpeg -i file.wav -f s16le -acodec pcm_s16le file.pcm
    Thanks
    Attachments:
    sample.vi ‏9 KB

    Hi tintin_99,
    Could I confirm if this command works without issue if run directly from command line without LabVIEW?
    This would establish if the issue is caused by System Exec or the command being used.
    Regards,
    Chris (CLED, CLD, CTD)
    NIUK Applications Engineering Specialist

  • Need Help -- How to Change the icon of a selected Tree Node

    Hi java gurus,
    i am working on Jtree application, and i am adding image icons to the Nodes.
    my dought is when i select a node, i want to display that selected node as opened and all other icons should remain closed.
    Example:
    -- root
    |
    ----child
    ----child1
    ----child2
    |
    ----SubChild
    ----SubChild1
    ----subchild2
    Here if i am selecting Child2 means, only the image icon of that child2 should open the nodes and display the icon , all other icons from root to subchild should remain same as closed.
    please some one suggest how i can do it,
    Thanks in advance,
    Cheers,
    Murali

    Stop crossposting!
    http://forum.java.sun.com/thread.jspa?threadID=787916&messageID=4476842#4476842

  • How to select node in JTree without firing event?

    I have got standard situation. JTree in the left panel, and several edit boxes in right panel. Certainly, I have TreeSelectionListener, which on every tree node selection shows corresponding model values in edit boxes.
    I'd like to implement next logic:
    1. Something was changed in any edit box in right panel. Model has been changed.
    2. User clicks on different node in tree.
    3. Dialog "Message was not saved. Save?" with Yes/No/Cancel buttons are shown.
    Yes/No buttons are easy to handle.
    Question is about Cancel. I'd like on Cancel button left all edit boxes in their present state (do not restore values from saved model) and select back node, which wasn't saved.
    Problem is next. If I select node by setSelectionPath or smth like that, but... JTree fires event and my listener receives onTreeItemSelected back, which checks that node wasn't saved and ......
    Who does have any idea, or have done similar tasks? How can I select node and do not allow tree fire event this time?
    Thanks in advance.

    First, as soon as the model changes (when editing any
    combo box) some flag will be set. Now the logic which
    updates the combo boxes will do it only on a change of
    the current node and (this is new) if the flag wasn't
    set. You should have some flag anyway because somehow
    you must determine when to show the dialog, shouldn't
    you?Yes, I have got this logic implemented. But it's only the half :)
    I know exactly when my model has been changed, but if it was changed, i'd like to ask user what to do next - svae/loose changes/cancel
    And on cancel i'd like to select last edited tree node and do not get event from tree at that moment.
    >
    Second way, prevent selecting a new node if that flag
    has been set. You could do this by subclassing
    DefaultTreeSelectionModel and overriding some methods
    (setSelectionPath() et al).Ok. I'll investigate this.
    >
    MichaelThanks.

Maybe you are looking for

  • Copy the latest file (only a part of file name and extension is known) from source to destination (VB)

    Hi, I need to copy a file (latest) that is present in Temp folder to AppData/Roaming folder. But I know that the file name starts with "MSI" and the file extension is ".log" (like MSI*.log where * is a random hexadecimal number). Also, I need to get

  • IMac randomly wakes up to black screen

    Ok, I suppose the title says it all, but here's more detail. We have a mid-2010 iMac used as a family computer with 5 user accounts. 95% of the time there are only two users logged in (me and my wife). Over the past couple of months we've had a probl

  • Only 12 GB RAM showing in BIOS of 890GXM-G65 when 16 GB RAM is installed

    Just added 2 x 4 GM RAM of the identical type as the original 2 x 4 GB to my son's PC, motherboard 890GXM-G65. Even after a BIOS flash to the latest version, the BIOS still only recognizes 12 GB RAM but Windows 8 confirms 16 GB is installed, with onl

  • Library with two users

    Have had a quick look, but there seem to be so many different issues about libraries, so apologies for posting a new thread. Basically, we have just bought a new MBP, and have two user accounts - one for me, and one for my wife. What we'd like to hav

  • Difference between SAP Carbon Impact and SAP EHS - Environment Compliance

    I am confused between the functionality offered by SAP Carbon Impact and how different it is from SAP EHS Management - Environment Compliance. I understand that both of them are different technical products from SAP with Carbon Impact being an on-dem