I HATE JTREE UPDATES!!!

I've tried everything I can think of, but the JTree never updates properly.
Here's an example of what's going on.
I have a JTree that uses Drag and Drop. I have 2 folders in the C:\ drive. They are C:\NewFolder1 and C:\NewFolder2
I open Windows Explorer and drag C:\NewFolder1 into my JTree, dropping it in C:\NewFolder2
Windows Explorer shows it now as C:\NewFolder2\NewFolder1, however my bastard JTree never changed. When I try to refresh the JTree, I can get the JTree to collapse itself, but when I re-expand it, it is the same old structure.
Below is the relevant portions of code... Any suggestions?
    // ------------------TREE CREATION--------  //
    DFM = new DefaultTreeModel( getRoot() ); //The Default Tree Model
    tree = new JTree( DFM );
    tree.setToggleClickCount(1);
    tree.setCellRenderer( new MyTreeRenderer() );
    tree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION ); //set single selection for the Tree
    tree.addTreeSelectionListener( new TreeSelectionListener()
      public void valueChanged( TreeSelectionEvent e )
        DefaultMutableTreeNode node = ( DefaultMutableTreeNode ) tree.getLastSelectedPathComponent();
        getChildren( node );
    scrollPane1.getViewport().add( tree, null );
// Should properly rebuild JTree //
  public void refreshTree()
    DFM.reload( getRoot() );     //getRoot() returns a DefaultMutableTreeNode
    //tree.setModel(DFM);
    //tree = new JTree(DFM);
    //scrollPane1.removeAll();
    //scrollPane1.getViewport().add( tree, null );
    scrollPane1.revalidate();
    scrollPane1.repaint();
  }

Below is my code...Maybe someone can spot something out of the ordinary?
package DND;
import jExplorer.DiskObject;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.*;
import java.io.File;
public class AutoscrollTree extends JTree implements Autoscroll, DragGestureListener, DragSourceListener
  private static final int AUTOSCROLL_MARGIN = 25;
  private Insets autoscrollInsets = new Insets( 0,0,0,0 );    // AutoScroll methods.
  private DefaultTreeModel dtModel;
  private DefaultMutableTreeNode root;
  public AutoscrollTree( DefaultMutableTreeNode root )
    super();
    this.root = root;
    dtModel = new DefaultTreeModel( root );
    setModel( dtModel );
    DragSource dragSource = DragSource.getDefaultDragSource();
    dragSource.createDefaultDragGestureRecognizer(
      this, // component where drag originates
      DnDConstants.ACTION_COPY_OR_MOVE, // actions
      this ); // drag gesture recognizer
    new DropTarget( this, getTargetListener() );
// AUTO SCROLLING //
  public void autoscroll( Point location )
  {        //System.out.println("mouse at " + location);
    int top = 0, left = 0, bottom = 0, right = 0;
    Dimension size = getSize();
    Rectangle rect = getVisibleRect();
    int bottomEdge = rect.y + rect.height;
    int rightEdge = rect.x + rect.width;
    if( location.y - rect.y <= AUTOSCROLL_MARGIN && rect.y > 0 ) top = AUTOSCROLL_MARGIN;
    if( location.x - rect.x <= AUTOSCROLL_MARGIN && rect.x > 0 ) left = AUTOSCROLL_MARGIN;
    if( bottomEdge - location.y <= AUTOSCROLL_MARGIN && bottomEdge < size.height ) bottom = AUTOSCROLL_MARGIN;
    if( rightEdge - location.x <= AUTOSCROLL_MARGIN && rightEdge < size.width ) right = AUTOSCROLL_MARGIN;
    rect.x += right - left;
    rect.y += bottom - top;
    scrollRectToVisible( rect );
  public Insets getAutoscrollInsets()
    Dimension size = getSize();
    Rectangle rect = getVisibleRect();
    autoscrollInsets.top = rect.y + AUTOSCROLL_MARGIN;
    autoscrollInsets.left = rect.x + AUTOSCROLL_MARGIN;
    autoscrollInsets.bottom = size.height - ( rect.y + rect.height ) + AUTOSCROLL_MARGIN;
    autoscrollInsets.right = size.width - ( rect.x + rect.width ) + AUTOSCROLL_MARGIN;
    return autoscrollInsets;
// Drag Listeners                                               //
  public void dragGestureRecognized( DragGestureEvent e )
    // drag anything ...
    String directory = getDirectory();
    e.startDrag( DragSource.DefaultCopyDrop, // cursor type
      new StringSelection( directory ),      // transferable
      this );                                // drag source listener
    System.out.println( "Start: " + directory );
  public void dragDropEnd( DragSourceDropEvent e )
    String directory = getDirectory();
    System.out.println( "End: " + directory );
  public void dragEnter( DragSourceDragEvent e )
    System.out.println( "Enter" );
  public void dragExit( DragSourceEvent e )
    System.out.println( "Exit" );
  public void dragOver( DragSourceDragEvent e )
    //  System.out.println( "Over" );
  public void dropActionChanged( DragSourceDragEvent e )
    System.out.println( "Action Changed" );
// DROP LISTENERS //
  public DropTargetListener getTargetListener()
    DropTargetListener dtl = new DropTargetAdapter()
      public void dragOver( DropTargetDragEvent dtde )
        int x = dtde.getLocation().x;
        int y = dtde.getLocation().y;
        TreePath path = getClosestPathForLocation( x, y );
        if( path != null )
          setSelectionPath( path );
      public void drop( DropTargetDropEvent dtde )
        try
// Ok, get the dropped object and try to figure out what it is.
          Transferable tr = dtde.getTransferable();
          DataFlavor[] flavors = tr.getTransferDataFlavors();
          for( int i = 0; i < flavors.length; i++ )
            System.out.println( "Possible flavor: " + flavors.getMimeType() );
// Check for file lists specifically.
if( flavors[i].isFlavorJavaFileListType() )
// Great! Accept copy drops...
dtde.acceptDrop( DnDConstants.ACTION_COPY );
System.out.println( "Successful file list drop.\n\n" );
// And add the list of file names to our text area
java.util.List list =
( java.util.List ) tr.getTransferData( flavors[i] );
// Destination directory
String directory = getDirectory();
File dir = new File( directory );
for( int j = 0; j < list.size(); j++ )
// Source File
File file = (File)list.get(j);
// Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (success)
System.out.println( "Moved "+list.get(j) + " to "+directory+"\n" );
else
System.out.println( "<ERROR>: Could not move "+list.get(j)+" to "+directory );
// If we made it this far, everything worked.
dtde.dropComplete( true );
// rebuild jtree
//if source folder still exists
// expand tree at source folder
// else expand tree at parent folder
// refresh table to match jtree
//refreshTree();
return;
// Hmm, the user must not have dropped a file list.
System.out.println( "Drop failed: " + dtde );
dtde.rejectDrop();
catch( Exception e )
e.printStackTrace();
dtde.rejectDrop();
return dtl;
// MISC FUNCTIONS //
public String getDirectory()
TreePath tp = getSelectionPath();
if( tp != null )
DefaultMutableTreeNode dmtn = ( DefaultMutableTreeNode ) tp.getLastPathComponent();
DiskObject dObj = ( DiskObject ) dmtn.getUserObject();
return dObj.getPath();
return null;
public void refreshTree()
System.out.println( "Refreshing Tree" );
dtModel.reload( root );
//dtModel.nodeChanged( root );
//dtModel.nodeStructureChanged( root() );
//setModel(dtModel);
//new AutoscrollTree(dtModel);

Similar Messages

  • HT3842 I updated iTunes to 11 and now I am unable to delete anything!! Very annoyed and I hate iTunes updates anymore. It shows a cloud with an arrow for me to download and I dont want to download the items..I already have them! How can I delete this garb

    I updated iTunes to 11 and now I am unable to delete anything!! Very annoyed and I hate iTunes updates anymore. It shows a cloud with an arrow for me to download and I dont want to download the items..I already have them! How can I delete this garbage??

    I have the same problem.   It's showing old podcasts that are available for download and I already watched and I don't want to see them again and I don't want them listed in my iTunes.  This latest upgrade is a piece of junk so far.   It destroyed my itunes podcast listing on my Windows Machine.   I have no intentions of upgrading to iOS7 or my Mac until I hear that things are fixed. 

  • I hate the update of the bar. It has totally done away with being able to skip back several places in the browser; now I can only click the back button and go back one page at a time. I otherwise hate the new layout, too. How do I undo this?

    I can't choose a specific page to skip back to but must click the back button over and over to get back to where I want to skip to. The little headings "most visited," "getting started," "Youtube," etc. have changed. They look more colorful, but I hate how the home button is clear over to the right side of the page, etc. What was wrong with the way everything was before? I HATE this new update, and I didn't even want it.

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Preventing JTree updates from uncompleted JTable edits

    Hello there!!
    I have an applet that displays an xml file in a JTree. Each node of the table represents specific elements of the xml file (some are not displayed by design). Also on the applet is a JTable that updates the displayed information depending on what node of the tree is clicked. The information displayed in the table includes names and values of attributes and names and values of xml elements not displayed in the JTree.
    I can edit values in the table and update that tree effectively, so that is not a problem.
    The problem I have is that if the user enters a value in the table, does not press enter and then clicks on another tree node, the entered value is copied into the new tree node. I would like to ignore all values if the user does not specifically press enter.
    I have seen some code examples in previous posts that partially work, but can't get the entered values to be totally ignored.
    I'm currently using the following code to handle the 'didn't press enter' bug.
            table.getEditorComponent().addFocusListener(
                    new java.awt.event.FocusListener(){
                public void focusGained(java.awt.event.FocusEvent e) {}
                public void focusLost(java.awt.event.FocusEvent e){
                    if ( table.getEditingRow() > -1 &&
                            table.getEditingColumn() > -1 ){
                        ((javax.swing.DefaultCellEditor)table.getCellEditor()).stopCellEditing();
            });So my question is: How do I prevent the value entered in the table cell from being copied to the newly clicked on tree node? Any assistance would be great.
    Thanks (even just for reading!)
    Simon
    PS. When are we going to see the back of the stupid censorship in this forum?

    Not too sure if this will help but here goes...
    Normally in a JTable, editing is automatically stopped when the enter key is pressed so there is no need to do anything special there. If you don't want editing to stop when the mouse is clicked elsewhere in the table, what you should do is call cancelEditing() instead of stopEditing() in your focusLost method.
    ;o)
    V.V.

  • JTree Update Leaf Icon

    Hi,
    I have two problem with Jtree.
    1.How can I put different Icons for different leafs of the same node?
    2.How is it possible to refresh or update the Jtree(by adding or removing some leaf) that the leaf Icons remain?
    Thanks for your help.

    1.How can I put different Icons for different leafs of the same node?Yes, ... either write a custom cell renderer or find a "merged icon".. there are examples of both around the forums.
    2.How is it possible to refresh or update the Jtree(by adding or removing
    some leaf) that the leaf Icons remain?No. if you remove a node, the node is gone. If you don't remove the node, the node stays. IF you want to leave the leaf icon, you can have a renderer which just displays the icon and not the text.

  • JTree: Updating a single node

    I have a Jtree and need, during the course of the apps execution, update the information in the tree, specifically change the icons of individual nodes. setLeafIcon() allows you to change the icon for the entire model, but I just need to change it for individual nodes. anyone else implement this or have any ideas?
    thanks.
    -karl

    ok, i still can't get it working, though im closer.
    my problem is that i use a wrapper node(AdapterNode) to wrap Node objects. Inside the AdapterNode is an icon field that gets initialized, then changed dynamically during the execution of the app. Through debuggin over the past 13 hours(ugh), i've found my root problem: the JTree re-renders ALL of its nodes everytime an event is fired. When this happens, it recurses down the tree, and reinitializes all of my icons. (The icons get initialized in the AdapterNode constructor. there is not other place to do this because of the recursion)
    I notice that 2 event listeners get registered with my custom TreeModel.
    I was thinking about setting a boolean flag for an initial render of the tree, then mark it false and have it update only specific nodes. any suggestions?
    thanks.
    -karl

  • JTree Updating question

    Hi there. I have two questions.
    I have a data structure that is being displayed in a JTree, so I made a Model and it works great. The data structure can be updated from non-gui interaction. The nodes don't change position or anything, its just the data that is displayed is changed. I handle it currently by calling a function in the model I made called nodesChanged(), which basically does the following:
    public void nodesChanged()
        int len = treeModelListeners.size();
        TreeModelEvent e = new TreeModelEvent(this, new Object[] {rootItem});
        for (int i = 0; i < len; i++) {
          ( (TreeModelListener) treeModelListeners.elementAt(i)).treeNodesChanged(e);
      }It does actually work, the changes are reflected in the JTree, but it seems a little expensive, and the updates to the actual data model could come at about 150 per second. To deal with that now, I just use a timer class that updates it about every 3/10's of a second, which does a pretty good job, but is there a more elegant way to do this? Something where the node is an observer of the data in the data structure (which are Observable objects)?
    The second question I have is when I do the above, sometimes the display name of the node will be larger than the value it had previously, but the Textbox (if that's what it is) doesn't grow, so I get a ... at the end.
    For example, if I have "Run" and it changes to "Stopped", it will show up as "Sto...".
    Any help would be great. TIA.

    well, you can start by making the node you put in the tree model event the lowest node in the tree that needs updating, instead of root.
    I don't know about the timer thing, cuz as far as I know, the listener will invoke code that will refresh the renderers, as opposed to painting where repaint calls can be merged into one. If you aren't getting that many updates all the time, you could implement something where the listener fires to an intermediate listener which will fire the info to the tree after a slight delay. That way if you get multiple updates, you can effectively ignore lots of them.
    The ... thing, I thought that treeNodesChanged was the appropriate method, although maybe it has to be for the specific node, not root.

  • JTree update problem

    Hi,
    I have created a JTree using the vector constructor. The hierachy is a teamList(Vector) -> team(Vector) -> players(Object). I put the teamList into the JTree construcotr.
    At various points in the program the user can add teams to the team list, or players to an existing team. This is no problem. However the JTree does not update when the structure is changed.
    I have found that it is updated if the tree isnt expanded, but once expanded it doesnt get updated. I have tried calling treeDidChange(), revalidate() and loads of other methods which sound like they might do the trick! but no success. I'm sure there must be a way of doing this and that I'm just missing the point!
    Do I need to add the data to the vectors some other way? Any suggestions are greatfully received. I've spent far too long on this already!

    What about separating the UI from the program logic and data? Perhaps the JTree shouldn't hold the data, just a representation of the data.

  • JTree update

    Hey,
    in one of the tools I am currently writing I am displaying data in a JTree.
    The user can edit the data that goes with the nodes,save the tree (not yet) and load a tree from a local file.
    Right now I want the user to be able to "reset" the tree. That means, whenever the user goes to "File - New Tree" he/she should get a new empty JTree.
    I put the JTree into a JScrollpane, which is part of a SplitPane, which is part of a JPanel, which is part of a JFrame.
    I wrote a little method "resetTree()" to update the tree.
    In this method I tried to just call the setup method again - which build the tree in the first place - but I was still able to see the old tree in my GUI.
    I tried to repaint all of the Panes above but that did not work either.
    //My constructor:
    public MyProgram() extends JPanel
    JFrame frame = new JFrame("Test");
    setupTree();
    setupSplitpane(); //This just takes the two ScrollPanes (one for each side) and
    //sets up a SplitPane
    this.setLayout(new BorderLayout());
    this.add(splitPane,BorderLayout.CENTER);
    frame.getContentPane().add(this,BorderLayout.CENTER);
    frame.pack();
    //This is the method which I call when creating the tree for the first time.
    private static void setupTree(String from)
    //TreeBuilder builds the tree. It can read a local xml file into
    //the tree. "from" is the path of the file. "data" is a Hashtable.
    //The method puts the data from the xml file into "data" and builds a tree.
    TreeBuilder myTreeBuilder = new TreeBuilder(from,data);
    //"tree" is a global JTree. "getTree()" returns the JTree myTreeBuilder build.
    tree = myTreeBuilder.getTree();
    //treeView is the JScrollPane
    treeView = new JScrollPane(tree);
    treeView.setPreferredSize(new Dimension( leftWidth, windowHeight ));
    tree.addMouseListener(new PopupListener(popup));
    //This is the method I call when trying to reset the tree.
    public void resetTree(String from)
    data = null;
    setupTree(from); //from = null in this case.
    splitPane.repaint(); //Repaint the Splitpane
    frame.repaint(); //Repaint the Frame
    this.repaint(); // Repaint the Panel.
    Again, my problem is, that when I call resetTree() the tree I can see in my GUI does not change. I want the tree in the left side of my JSplitpane to be setup again from zero (containing no data and no nodes) and than to update the GUI.
    I hope somebody got what I am trying to do and is able to show me a solution or just give me a little hint on howto solve this problem.
    THX!
    Martin

    Thank you very much!
    I got it working like this:
    JTree tree = myX.getTree();
    DefaultTreeModel mdel = (DefaultTreeModel)(tree.getModel());
    Object t = mdel.getRoot();
    if(t instanceof DefaultMutableTreeNode)
    DefaultMutableTreeNode root = (DefaultMutableTreeNode)(t);
    root.removeAllChildren();          
    mdel.reload();
    Still quick and dirty but it works...
    THX
    Martin

  • Help with JTree Update

    Hi there,
    I need to do a simple thing with a JTree but I 've got a problem. Well I want to create a very very very simple bookmark function. I have a tree with the children and I want to add new children which are going to work like link for my program. I try to add new children the same way I created them but it's not working. I tried also the updateUI method that somebody mentioned in an other topic but still nothing. Can somebody help?
    Here is the Bookmark Panel code:
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.awt.*;
    public class BookmarkTry implements TreeSelectionListener {
        private JScrollPane scrollPane;
        private JLabel label;
        DefaultMutableTreeNode root = new DefaultMutableTreeNode("Bookmarks");
        private JTree tree;
        private JPanel panel = new JPanel();
         public BookmarkTry(){
         public JPanel createpanel(){
         tree = new JTree(root);
         root.add(new DefaultMutableTreeNode(new Bookmark("Chapter 1","about.html")));
        root.add(new DefaultMutableTreeNode(new Bookmark("Chapter 2","aaa.html")));
        root.add(new DefaultMutableTreeNode(new Bookmark("Chapter 3","sdss.html")));
        // build tree
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.addTreeSelectionListener(this);// get selection events!
        // build form
        scrollPane = new JScrollPane(tree);
        label = new JLabel(" ");
        //scrollPane.setViewportView(tree);
        panel.add(label);
        panel.add(scrollPane);
        return panel;
        public void addBookMarks(String name, String page){
             root.add(new DefaultMutableTreeNode(new Bookmark(name,page)));
             //DefaultTreeModel.reload();
        public void valueChanged(TreeSelectionEvent treeSelectionEvent) {
            DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
            if ((selectedNode!=null)&&(selectedNode.isLeaf())) {
                Bookmark b = (Bookmark)selectedNode.getUserObject();
                label.setText("Go to page "+b.getPage());
        private static class Bookmark {
            private String caption;
            private String page;
            public String getPage() {
                return page;
            public Bookmark(String caption, String page) {
                this.caption = caption;
                this.page = page;
            public String toString() {
                return caption;
         and here how I try to add the node :
    void jButton1_actionPerformed(ActionEvent e) throws java.sql.SQLException {
            DefaultMutableTreeNode book = null;
            System.out.println("You pressed the add button of bookmarkframe");
            //Bookmark.getTreePanel().addObject(name.getText());
            //book = new DefaultMutableTreeNode(new BookInfo(name.getText(),page.getText()));
            System.out.println(name.getText());
            System.out.println(page.getText());
            tempb.addBookMarks(name.getText(),page.getText());
            frame.dispose();
       } //void jButton1_actionPerformedIt doesn't add the new node in my JTree
    Thanks in advance

    I still suspect you have two (or more) new BookmarkTry() executions somewhere. But I can't see all of your code here of course. My standard reply, so we don't waste time guessing:
    1) In the future, Swing related questions should be posted in the Swing forum.
    2) If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.
    Note, we don't want your whole application. We want an SSCCE!

  • Installing oracle 10g R2 on Red Hat AS4 update 6

    Has anyone been able to get 10g R2 to install on Red Hat AS 4 u6?
    I have had errors on both the 64 bit version and the 32 bit version.
    32 Bit Version
    The 32 bit version useing the 32 bit version of oracle 10g r2 (10.2.0.1) displays this error: Enterprise manager configuration failed due to the following error - Invalid value null for parameter PORT.
    The log states:
    CONFIG: SQLEngine connecting with SID: murasaki, oracleHome: /opt/oracle/product/10.2.0/db_1, and user: DBSNMP
    May 2, 2008 8:56:11 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: SQLEngine created successfully and connected
    May 2, 2008 8:56:11 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Invalid value null for parameter PORT
    Refer to the log file at /opt/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/murasaki/emConfig.log for more details.
    May 2, 2008 8:56:11 AM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Invalid value null for parameter PORT
    at oracle.sysman.emcp.ParamsManager.checkParam(ParamsManager.java:2630)
    at oracle.sysman.emcp.EMDBPreConfig.checkConfigParams(EMDBPreConfig.java:1285)
    at oracle.sysman.emcp.EMDBPreConfig.checkParameters(EMDBPreConfig.java:1060)
    at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:174)
    at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:160)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:141)
    at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:426)
    at java.lang.Thread.run(Thread.java:534)
    64 Bit version
    The 64 bit versions spits out unable to make "install" various different files anywhere between 62% to 68% completed.
    unfortunately i dont have more information on the error at this time. I have all the development packages installed.
    any help would be greatly apreciated as i am getting no where with google and searching various forums.

    Please check on this link.. that may help you.
    http://www.puschitz.com/InstallingOracle10g.shtml
    --Girish                                                                                                                                                                                                                               

  • Dynamic JTree; updating the Jtree during app execution

    I have a JTree that renders a DOM Tree. All is well. I can set different icons in the tree depending on the type of node. The functionality I need is to dynamically change the icon in the JTree for a given node. I have a wrapper object that extends DefaultMutableTreeNode and contains an Icon member varrialbe. The problem is that this varriable is initialized by a custom TreeCellRenderer depending on the contents of the node.
    I have also tried having a node_status flag inside my wrapper node, to give the Cell Renderer something to check to determine what to make the icon. The problem, I think, is that the JTree gets rerendered everytime an AWT event is fired; rerendering the JTree causes my wrapper nodes to be reinstanticated thus clearing all information in the Node, including the node_status flag.
    Has anyone done anything similar, or does anyone have any insight into what is going on?
    thanks.
    -karl

    I have figured out my problem and am posting it in the hopes that it helps others.
    I created a custom TreeModel to deal with taking an XML (DOM) Tree and rendering it in a JTree. The problem comes from the custom class that I created to wrap the DOM nodes. The geometry for the DOM tree is contained in the DOM Node (getChild(x), an XML Tree is really just a single node with children, etc) and the problem stems from the wrapper object not knowing about the geometry of the tree except by traversing the tree through the DOM Nodes; since the DOM Node is a member of the wrapper node, traversal through the DOM tree breaks any data stored in the wrapper node which is reinitialized whenever you try to get a node's child.
    Solution:
    Do not render the tree recursivly with the DOM Nodes: render the tree itteratively with wrapper nodes. Because of the frequency the JTree gets redrawn, and thus the TreeModel gets hit with events, maintaining a semi-static tree will keep the information in the nodes.
    -Karl

  • Why cant I get itunes to work in windows 8? I hate this  update issue nothing works- aggh!

    Why cant I get itunes update to work in windows 8?
    I tried running the new itunes installer since it couldn't update itunes, then I tried the installer with
    compatability checked. The older version worked fine till an update came out and now nothing works
    (sync /app updates/ photo uploads)- it does still play music on the computer.
    My son had older (windows 7) computer but if I sync there it tells me I'm wiped and stuck with his music.
    I'm really hating itunes and ready to trash the phone etc. Im due for upgrade anyway.
    With all these stupid upgrades why hasn't this issue been addressed. 8 has been out for awhile now.
    Has anyone been able to fix this issue? Please share how!

    You will need iTunes 9.2.1 at minimum to access the iTunes Store. Earlier versions will not work.
    http://support.apple.com/kb/DL1056
    but it would be best to upgrade to Mac OS X 10.5 or 10.6, since it's probable that eventually the iTunes Store will no longer support iTunes 9.x. and newer versions of iTunes will not run on Mac OS X 10.4.
    Regards.

  • Will the update change my page again as it normally does? I hate your updates

    Every time you have an update, something is unnecessarily changed on my home page. The bookmarks thing might be moved. I get messages saying that Firefox has blocked something and I have to open it. Messages saying that I have to close it down for some reason. Why do you have to change things that have been OK for so long just for sake of doing it. I was used to going to the right of my screen for my bookmarks, now I have to go to the left. What was achieved in that move. It seems to me that someone is given the job of doing an update and he/she decides to change things simply because they can do. Is this going to happen again with this update, if so, then I can't be bothered with it.

    Okay. So the third or forth time resetting all those things didn't work. So I started up in safe mode. And currently it's spinning with a circle with the cross logo.
    I have it running off an external hard drive. I think it's due to to that nhence the logo.
    So I'll just let it sit he unless there's a way you know to make it pick up right away.

  • Hate the update to 5.0 - lost lots of stuff

    I just updated to 5.0 software.  BEWARE:  it will unload any apps that are not compatible with 5.0, like Google Maps, Facebook, Google Mobile App, etc.  I lost all of my saved places in Google maps, lost all of my calendar events (had to resync to get them back), lost my fake money in the Texas Hold 'Em app, etc.  I've spent hours getting it back to the way I like it.
    And, I don't really like how texts look now -- they changed the layout.
    IS THERE A WAY TO RETURN TO THE OLD VERSION???

    It's probably too late now, but you should always do a backup in Desktop Manger prior to doing an upgrade.  I've never had to downgrade, but I've used advanced restore to put some settings and databases back that were messed up after an upgrade.  So what I'm getting at is that if you have a pre-OS5 backup theorhetorically you should be able to reload version 4.x then restore from a backup to get everything back. Otherwise it is probably gone.
    EDIT: JSanders is correct and I didn't mean to imply that a downgrade was possible from backup/restore just that once it was downgraded you should be able to restore your settings with a backup.  Sorry for the confusion.

Maybe you are looking for

  • Subsequent Credit Memo

    I have a requirement to post a subsequent credit memo that have been send by some vendors in order to make correction to the prices that they have charged in a previous invoice. I need therefore to post a subsequent credit memo for a purchase order t

  • Having problems installing iTunes on Windows XP

    Having problems installing iTunes on Windows XP - Error msg "There is a problem with Windows Installer Pkg. A program required for this install to complete could not be run. "  However, it's an iTunes error msg.

  • Using a 16bit Image in Illustrator poster

    I'm making a poster and am used to using 8bit images. The photographer I'm working with insists on using a 16 or 32bit version of his photo in the poster I'm designing. I'm used to laying out designs in Illustrator and then linking a .psd, but since

  • Wildcard SSL cert on ASA

    Is it possible to use a wildcard SSL cert on an ASA? That is, instead of getting a specific cert with the FQDN of the ASA, we would use the wildcard cert issued?

  • MBP i7 question

    Got this MBP around 4 weeks ago. Everything is fantastic, but I saw that my cores were not being fully used when needed. Firstly I was running Final Cut 7 and exporting a movie. I looked at my activity monitor and only cores 1 & 3 were being used (80