Package javax.swing

Examples of javax.swing.JTree.scrollPathToVisible()


        URL[] result = getResoureFinder().findResource(resourceName, classpathURLs);
        if (result == null || result.length == 0) {
            DefaultMutableTreeNode newChild = new DefaultMutableTreeNode("Resource Not Found!");
            model.insertNodeInto(newChild, root, root.getChildCount());
            resultTree.scrollPathToVisible(new TreePath(newChild.getPath()));
        } else {
            DefaultMutableTreeNode lastNode = root;
            for (URL url : result) {
                DefaultMutableTreeNode newChild = new DefaultMutableTreeNode(url);
                model.insertNodeInto(newChild, root, root.getChildCount());
View Full Code Here


            for (URL url : result) {
                DefaultMutableTreeNode newChild = new DefaultMutableTreeNode(url);
                model.insertNodeInto(newChild, root, root.getChildCount());
                lastNode = newChild;
            }
            resultTree.scrollPathToVisible(new TreePath(lastNode.getPath()));
        }
    }

    /**
     * At startup create and show the main frame of the application.
View Full Code Here

                model.insertNodeInto(node, parent, parent.getChildCount());
                lastNode = node;
            }

            // Show the newly added items
            classpathTree.scrollPathToVisible(new TreePath(lastNode.getPath()));
            return true;
        }
        return false;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.