Checkbox Tree in JavaFX

Does anybody has an idea where I find an example for a checkbox Tree? Thx

There is no Checkbox Tree control in JavaFX (as of now). I've written one long time back in Java. You could adopt it to use in JavaFX as a swing component.
[http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html]
[http://winstonprakash.com/sources/java2html/tree/JCheckBoxTreeTester.java.html|http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html]

Similar Messages

  • A checkbox tree control

    Hi All,
    I need to create a checkbox tree control to show the user and make him select the directory listing of application-home on the server side. I have a solution wherein I have to submit the page every time the checkbox is clicked, but that is not efficient.
    I need to select all the child node checkboxes once the parent checkbox is selected and well I need to show the parent checkbox greyed if even one child is not selected and show the parent deselected if all child nodes are unclicked.
    Please Help...
    Thanks
    Ultimate.

    U can handle all these by JavaScript. there's no time to sit and write code fer u, just try to show the way!
    do some search on huge set of javascript codes/sample on net to handle those things.
    --Behrad                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 3 State CheckBox Tree

    I just downloaded the 3 State CheckBox Tree custom control
    from the Flex dev exchange a few moments ago. I put the code into a
    Flex prject, compiled it and ran it pretty much unchanged. When I
    click on any of the tree controls I get the error message:
    ArgumentError: Error #2025: The supplied DisplayObject must
    be a child of the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at mx.managers::SystemManager/getChildIndex()
    at mx.managers::SystemManager/::mouseDownHandler()
    Anybody else download this tag and have a problem like
    this???
    Have an Ordinary Day...
    KomputerMan ~|:-)

    O.K. I pulled the downloaded component inside an existing
    application and ran it from there. The problem was that the
    downloaded component had a <mx:Application...> tag in it
    which gave me two templates with the <mx:Application ...>
    tag. Flex didn't like this too much. After I renamed the
    <mx:Application...> tag in the downloaded component to
    <mx:Canvas...> life was good. One of those duh moments...
    DUH!!! :)
    Have an Ordinary Day...
    KomputerMan ~|:-)

  • APEX 4 checkbox tree template

    Hello,
    why is no more available the checkbox tree template?
    is there a workaround to obtain the same result starting from the classic template?
    Thank you,
    matteo

    Oracle - can we not at least have what you had working for check boxes so we can try to extend it to our needs.????
    We have a great need for the ability to show what was checked, we can use AJAX to do whatever process...
    Any help is much appreciated... :>)
    Thanks, Bill

  • Checkbox Tree

    In old threads about new tree functionality in 4.0 I see examples of the Checkbox Tree, however, in the final version when I create the tree I do not see this option. Was it dropped from final release or am I doing something wrong?

    Hi All,
    I just came across this code that searching the forum for "tree", one of the first posts.
    It is not showing correctly below so go to this link and look at original:
    Tree Formatting
    It allows the HTML tags to be interpretted as HTML tags...
    /* getElementsByClass from http://bit.ly/dj8Xk8 */
    function getElementsByClass( searchClass, domNode, tagName) {
         if (domNode == null) domNode = document;
         if (tagName == null) tagName = '*';
         var el = new Array();
         var tags = domNode.getElementsByTagName(tagName);
         var tcl = " "+searchClass+" ";
         for(i=0,j=0; i<tags.length; i++) {
              var test = " " + tags.className + " ";
              if (test.indexOf(tcl) != -1)
                   el[j++] = tags[i];
         return el;
    function fixTreeHTML() {
         var treeParts = new Array("leaf","open","closed");
         for( p=0; p < treeParts.length; p++ ) {
              var nodes = getElementsByClass(treeParts[p],document,'li');
              for( i=0; i < nodes.length; i++ ) {
                   var ihtm = nodes[i].innerHTML;
                   ihtm = ihtm.replace(/& lt;/ig,"<"); // there is a space & lt just to post on forum
                   ihtm = ihtm.replace(/& gt;/ig,">"); // there is a space & gt just to post on forum
                   nodes[i].innerHTML = ihtm;
    Edited by: BillC on Oct 25, 2010 2:32 PM

  • Checkbox Trees

    Hi All,
    I have a requirement that I feel would be best implemented with a tree if I can get the functionality working.
    First off I am on apex 4.2.2.00.11.  I implemented a solution for creating a checkbox tree that Alex Nuijten https://plus.google.com/118115428098299370580 discussed in his blog from 7/23/2013.  I then added in the drag and drop functionality that was discussed in forum thread https://forums.oracle.com/thread/2274874.
    Now I have a tree that has the chechboxes and the ability to reparent a node through drag and drop.  The problem I now have is in trying to save the changes and acting upon the checked nodes.  When I check a node I would like to perform an action in the database.  Unfortunately I am drawing a blank on how to reference the nodes.
    Just wondering if anyone might have any ideas on how to do this?
    Thanks for your time.
    Tom

    Remy Suen wrote:
    > On Wed, 16 Sep 2009 13:27:05 +0000, amay wrote:
    >> I am using checkboxtreeviewer in my application. I want it to behave
    >> like other checkbox trees in Eclipse IDE. When user checks parent
    >> checkbox, all its child item checkboxes should get checked, if any child
    >> item is checked, its parent item should get grayed and when all the
    >> child items are checked then parent should get automatically checked and
    >> so on.
    > I think you want ContainerCheckedTreeViewer?
    > http://help.eclipse.org/stable/nftopic/org.eclipse.platform. doc.isv/
    > reference/api/org/eclipse/ui/dialogs/ContainerCheckedTreeVie wer.html
    > Regards,
    > Remy
    Thank you Remy,
    This is exactly what I wanted.
    -amay.

  • CheckBox Tree Component

    Hye guys,
    I need a custom tree component for some xml elements that represent some files and their attributes. I have written one such component but what I need now to add to this component is Checkboxes.
    The user is supposed to select files from this Tree component via these chk boxes.
    Can someone point me in the direction of such an existing Tree component.
    Or if I have to write one how do I go about it.
    Pls donot point me to the Java tutorial. I read it but I still have a very very vague idea, if any idea at all, of doing this.
    Regards

    worth a look
    http://forum.java.sun.com/thread.jsp?forum=57&thread=122006

  • JavaFX Tree Scenario

    At present I am experimenting with trees in JavaFX and would like to know if the following scenario is possible? At present I have a tree structure that displays a checkbox for every tree node except the root node where I use a graphics icon. Now what I would like to combine with the above is for a textbox to appear when a node is selected, so that the user can edit the treeitems value/label. Can this be achieved in conjunction with what I have at present, cause I have the nasty feeling it probably is not possible in combination? If I use the TableView tutorial on the JavaFX website as an example. I'm curious to see what other peoples responses are in relation to this?

    Yeah it's possible, I tried hacking up some really ugly buggy code which I won't paste here to verify an approach for this.
    Approach was:
    1. Create a TreeView as here => http://download.oracle.com/javafx/2.0/api/javafx/scene/control/TreeView.html
    2. Type the TreeView as a new CheckedString utility class containing both a boolean value for the check and a string value for the check label.
    3. On the root of the treeview set a graphic.
    4. Create an editable TreeView cell factory as detailed in 13-9 and 13-10 here => http://download.oracle.com/javafx/2.0/ui_controls/table-view.htm
    5. In this case you don't want to use the setContentDisplay method as is done in 13-9
    6. In the editing tree cell, instead of setting the content display of the node, store two views on the field, one an editable view and another one readonly.
    7. Editable view consists of a checkbox + textfield in a hbox.
    8. Readonly view consists of just a labeled checkbox.
    9. When the startEdit method is called, reject the call if the call is for the tree root (that way the root graphic is not editable).
    10. In startEdit switch the state of the TreeCells current view to the editable view by setting the cells graphic to the edit view.
    11. In the cancelEdit switch the state of the TreeCells current view to the readonly view by setting the cells graphic to the read only view.
    12. In the updateItem, if it is the root item, just show the root graphic, otherwise query the current state of the TreeCell and refresh and show either the edit or read only view as appropriate (by switching the cells graphic).
    Seems complicated, but you are also trying to design a reasonably complicated UI node. You will have to tweak the thing a bit to make it nice and usable. If at all possible, I'd advise a reconsidering the UI design and trying for something simpler.

  • Can't get Checkbox selection status in Tree

    Hi,
    I'm using a Checkbox Tree which I got from here: [http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm|http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm]
    Now, I want to determine whether the Checkboxes are selected or not.
    Unfortunately, the custom CheckBox model class always returns true, which is stored in a Vector.
    In short, this is how the checkTree is created:
    CheckBoxNode tabFormatNode = new CheckBoxNode[]{new CheckBoxNode("GP3", true),
                                        new CheckBoxNode("GP4", true),
                                        new CheckBoxNode("GP5", true)};
    NamedVector formatVector = new NamedVector("Format", tabFormatNode);
    Object[] rootNodes = new Object[]{ formatVector }
    Vector rootVector = new NamedVector("root", rootNodes);
    TreeModel model = createTreeModel(rootVector);
    setModel(model);As I said, when I retrieve a CheckBoxNode from the Vector, it always return true on isSelected(), so that's no use.
    However, the renderer does manage to get the selection status correctly.
    private static class CheckBoxNodeRenderer implements TreeCellRenderer
            private JCheckBox leafRenderer = new JCheckBox();
            protected JCheckBox getLeafRenderer()
                return leafRenderer;
            public CheckBoxNodeRenderer()
            public Component getTreeCellRendererComponent(JTree tree, Object value,
                  boolean selected, boolean expanded, boolean leaf, int row,
                  boolean hasFocus)
                Component returnValue;
                if (leaf)
                    String stringValue = tree.convertValueToText(value, selected,
                        expanded, leaf, row, false);
                    leafRenderer.setText(stringValue);
                    leafRenderer.setSelected(false);
                    if (selected)
                        leafRenderer.setForeground(selectionForeground);
                        leafRenderer.setBackground(selectionBackground);
                    else
                        leafRenderer.setForeground(textForeground);
                        leafRenderer.setBackground(textBackground);
                    if ((value != null) && (value instanceof DefaultMutableTreeNode))
                        Object userObject = ((DefaultMutableTreeNode) value)
                        .getUserObject();
                        if (userObject instanceof CheckBoxNode)
                            CheckBoxNode node = (CheckBoxNode) userObject;
                            leafRenderer.setText(node.getText());
                            leafRenderer.setSelected(node.isSelected());
                            // eigen
                            leafRenderer.setEnabled(Overview.getTabbedPane().getActiveTabList().isLeftPaneEnabled());
                    returnValue = leafRenderer;
                else
                  returnValue = nonLeafRenderer.getTreeCellRendererComponent(tree,
                      value, selected, expanded, leaf, row, hasFocus);
                return returnValue;
        }Could anyone help me with retrieving the correct selection values of the CheckBoxes?
    Edited by: Tails on 21-mrt-2008 13:07

    OK Tails. here are the changes you need, in CheckBoxNodeEditor method getTreeCellEditorComponent. Note that Component editor is now declared as final so that in can be accessed from within the inner class.   public Component getTreeCellEditorComponent (JTree tree, Object value,
             boolean selected, boolean expanded, boolean leaf, int row) {
          // change to final
          final Component editor = renderer.getTreeCellRendererComponent (tree, value,
                true, expanded, leaf, row, true);
          // editor always selected / focused
          // line added
          final CheckBoxNode cbn = (CheckBoxNode) ((DefaultMutableTreeNode) value).getUserObject ();
          ItemListener itemListener = new ItemListener () {
             public void itemStateChanged (ItemEvent itemEvent) {
                // line added
                cbn.setSelected (((CheckBoxNode) getCellEditorValue ()).isSelected ());
                if (stopCellEditing ()) {
                   fireEditingStopped ();
          if (editor instanceof JCheckBox) {
             ((JCheckBox) editor).addItemListener (itemListener);
          return editor;
       }Get back to us on whether that solves the problem, willya.
    db

  • JavaFX Tree with Drag n Drop functionality

    Hi
    I was trying to build a tree in JavaFX where the all the nodes of the tree will be draggable and droppable. Could anyone show me the way to do it or provide one nice example?
    Thanks
    Rashed

    Hi,
    I don't know if it's what you are looking for, but I programmed a small example of pure-JavaFX-DnD just recently and made a blog post about it:
    [http://my.opera.com/zilti/blog/proof-of-concept-series-drag-and-drop]

  • [APEX 4.0] EA2 Tree , checkbox

    I'm checking out the new APEX tree region, to be exact the checkbox tree. But how can you read values from this tree. It's values are not stored in the session it seems.

    Hello Harvey,
    It is the jsTree ([http://www.jstree.com/]) jQuery plugin. You should be able to use that already in the current version of APEX.
    If it will be an APEX Plugin in the near future? I guess that's more up to you (or "us", as APEX Developers) to create a nice Plugin for it.
    But maybe the APEX Dev Team will create one as example if you're nice to Patrick or Anthony ;-)
    Greetings,
    Roel
    http://roelhartman.blogspot.com/

  • Selected Tree Checkboxes Value

    Hi,
    can someone assist me on this?
    I have a Checkbox Tree and I would like to show in a page item (for example a Text Area) the value of all selected checkboxes.
    My page item name is P6_FEEDBACK and should be in the same page as my Tree region (name of Tree region is Treeviw1).
    This is my Tree Query:
    SELECT
      CASE
        WHEN connect_by_isleaf = 1
        THEN 0
        WHEN level = 1
        THEN 1
        ELSE -1
      END AS status,
      LEVEL,
      OBJECT_NAME  AS title,
      NULL        AS ICON,
      OBJECT_NAME AS value,
      OBJECT_NAME AS tooltip,
    null  as link 
    FROM
      OWNER.TABLE_NAME
    WHERE
        PARENT_OBJ_1 = v('TABLE')
      OR OBJECT_NAME = v('TABLE')
      OR PARENT_OBJ_2 = v('TABLE')
      START WITH PARENT_OBJ_2    is null
      CONNECT BY prior OB_P1= P1_P2
    ORDER SIBLINGS BY
      OBJECT_TYPE,OBJECT_NAME;
    I also tried to modify the above query and add a limk to the page item but this is not working.
    Thanks

    Hi ,
    Thank you that was exactly what I was looking for. I couldn't find how to pass database column to javascript as an input parameter. So thanks for your help. I made a couple of correction :
    1) I put additional ' characters to ('''||"NAME"||''') this part because my field is varchar.
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    NAME as title,
    null as icon,
    "ID" as value,
    null as tooltip,
    'javascript:setFObjName('''||"NAME"||''')' As link
    from "#OWNER#"."TABLE_NAME"
    start with "PID" is null
    connect by prior "ID" = "PID"
    2) In script I have added ' character before and after page item.
    function setFObjName(pobjName){
    $s('P1_OBJ_NAME', pobjName);
    So it works. Thanks tfor your help.

  • FileSystemTree and TreeItemRenderer random selected Checkboxes

    When implementing
    Three
    State Checkbox Tree solution on a FileSystemTree, the
    checkboxes will randomly change states while scrolling. This
    happens when the checkbox leaves the viewable area.
    The state of the check box is being held within a
    ModelLocator from the Cairngorm project (obviously using the
    framework). Is there any work around for this? I have changed very
    little of the code given in the cookbook example. Of course I am
    passing in the FileSystem.File object and checking the nativePath
    against the data inside the ModelLocator. There is a hash map
    implementation storing the state.
    Any help would be most welcome. I think I am far more bald
    now then when I started coding this.
    - Blake

    Hi Blake,
    I have been looking at it for the past couple of days.
    Couldn't figure it out yet.. With the FileSystemTree the File
    object is being passed in. How do you store state in it? Tried
    hacking by storing it in File properties like url but doesn't work.
    You mention about a "hash map implementation storing the state".
    Any info about it would be great.
    Thanks.

  • JavaFX with Database

    i need your help.
    i have a question. plz answer me.
    when i use table or tree in JavaFX using "Letters", i could see these on the web page(get the information from "words")
    (ProjectName->mouse right button click->choose Properties->choose RUN->click RuninBrowser comboBox)
    but, when i make a table and tree using Database, i cannot see these on the web page.(get the information from DB)
    what's the problem?
    JavaFX doesn't support this?

    I am not sure I fully understood the question, so excuse me if I doesn't address it.
    Mu guess is that you made a JavaFX program accessing a database at a given URL, and you try to use this script in the browser, without result.
    The issue is probably that the database is located in a different server than your Web page with the applet, so standard Java security kicks in.
    You need to sign the applet to let it access resources on different server.
    HTH.

  • Code for complete JTree of mycomputer (dynamic) but need to add checkboxes

    //the bug is where i am sending the value to the checkbox.. if somebody can add checkboxes to every node plz reply soon
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Font;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.awt.event.MouseEvent;
    import java.util.EventObject;
    import java.util.Vector;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.event.ChangeEvent;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.TreeCellEditor;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class CheckBoxNodeTreeSample {
    public static void main(String args[]) {
    JFrame frame = new JFrame("CheckBox Tree");
    /* CheckBoxNode accessibilityOptions[] = {
    new CheckBoxNode(
    "Move system caret with focus/selection changes", false),
    new CheckBoxNode("Always expand alt text for images", true) };
    CheckBoxNode browsingOptions[] = {
    new CheckBoxNode("Notify when downloads complete", true),
    new CheckBoxNode("Disable script debugging", true),
    new CheckBoxNode("Use AutoComplete", true),
    new CheckBoxNode("Browse in a new process", false) };
    Vector accessVector = new NamedVector("Accessibility",
    accessibilityOptions);
    Vector browseVector = new NamedVector("Browsing", browsingOptions);
    Object rootNodes[] = { accessVector, browseVector };
    Vector rootVector = new NamedVector("Root", rootNodes);
    setLayout(new GridLayout(1,1));
    //create the top node
    MutableTreeNode root = new DefaultMutableTreeNode("Computer");
    //get all nodes for top file systems or disks
    //On Linux/Unix this will only be '/'
    //while on Window there will typically be more: 'A:', 'C:' etc.
    File roots[] = File.listRoots();
    //loop through all these nodes and add them to the root Computer node
    int i = 0;
    for(File f : roots) {
    DefaultMutableTreeNode node = new DefaultMutableTreeNode(f.getAbsoluteFile().toString());
    root.insert(node, i++);
    //create a tree model with the Computer node as root
    model = new DefaultTreeModel(root);
    JTree tree = new JTree(model);
    CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
    tree.setCellRenderer(renderer);
    tree.setCellEditor(new CheckBoxNodeEditor(tree));
    tree.setEditable(true);
    JScrollPane scrollPane = new JScrollPane(tree);
    frame.getContentPane().add(scrollPane, BorderLayout.CENTER);
    frame.setSize(300, 150);
    frame.setVisible(true);
    class CheckBoxNodeRenderer implements TreeCellRenderer {
    private JCheckBox leafRenderer = new JCheckBox();
    private DefaultTreeCellRenderer nonLeafRenderer = new DefaultTreeCellRenderer();
    Color selectionBorderColor, selectionForeground, selectionBackground,
    textForeground, textBackground;
    protected JCheckBox getLeafRenderer() {
    return leafRenderer;
    public CheckBoxNodeRenderer() {
    Font fontValue;
    fontValue = UIManager.getFont("Tree.font");
    if (fontValue != null) {
    leafRenderer.setFont(fontValue);
    Boolean booleanValue = (Boolean) UIManager
    .get("Tree.drawsFocusBorderAroundIcon");
    leafRenderer.setFocusPainted((booleanValue != null)
    && (booleanValue.booleanValue()));
    selectionBorderColor = UIManager.getColor("Tree.selectionBorderColor");
    selectionForeground = UIManager.getColor("Tree.selectionForeground");
    selectionBackground = UIManager.getColor("Tree.selectionBackground");
    textForeground = UIManager.getColor("Tree.textForeground");
    textBackground = UIManager.getColor("Tree.textBackground");
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected, boolean expanded, boolean leaf, int row,
    boolean hasFocus) {
    Component returnValue;
    if (leaf) {
    String stringValue = tree.convertValueToText(value, selected,
    expanded, leaf, row, false);
    leafRenderer.setText(stringValue);
    leafRenderer.setSelected(false);
    leafRenderer.setEnabled(tree.isEnabled());
    if (selected) {
    leafRenderer.setForeground(selectionForeground);
    leafRenderer.setBackground(selectionBackground);
    } else {
    leafRenderer.setForeground(textForeground);
    leafRenderer.setBackground(textBackground);
    if ((value != null) && (value instanceof DefaultMutableTreeNode)) {
    Object userObject = ((DefaultMutableTreeNode) value)
    .getUserObject();
    if (userObject instanceof CheckBoxNode) {
    CheckBoxNode node = (CheckBoxNode) userObject;
    leafRenderer.setText(node.getText());
    leafRenderer.setSelected(node.isSelected());
    returnValue = leafRenderer;
    } else {
    returnValue = nonLeafRenderer.getTreeCellRendererComponent(tree,
    value, selected, expanded, leaf, row, hasFocus);
    return returnValue;
    class CheckBoxNodeEditor extends AbstractCellEditor implements TreeCellEditor {
    CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
    ChangeEvent changeEvent = null;
    JTree tree;
    public CheckBoxNodeEditor(JTree tree) {
    this.tree = tree;
    public Object getCellEditorValue() {
    JCheckBox checkbox = renderer.getLeafRenderer();
    CheckBoxNode checkBoxNode = new CheckBoxNode(checkbox.getText(),
    checkbox.isSelected());
    return checkBoxNode;
    public boolean isCellEditable(EventObject event) {
    boolean returnValue = false;
    if (event instanceof MouseEvent) {
    MouseEvent mouseEvent = (MouseEvent) event;
    TreePath path = tree.getPathForLocation(mouseEvent.getX(),
    mouseEvent.getY());
    if (path != null) {
    Object node = path.getLastPathComponent();
    if ((node != null) && (node instanceof DefaultMutableTreeNode)) {
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
    Object userObject = treeNode.getUserObject();
    returnValue = ((treeNode.isLeaf()) && (userObject instanceof CheckBoxNode));
    return returnValue;
    public Component getTreeCellEditorComponent(JTree tree, Object value,
    boolean selected, boolean expanded, boolean leaf, int row) {
    Component editor = renderer.getTreeCellRendererComponent(tree, value,
    true, expanded, leaf, row, true);
    // editor always selected / focused
    ItemListener itemListener = new ItemListener() {
    public void itemStateChanged(ItemEvent itemEvent) {
    if (stopCellEditing()) {
    fireEditingStopped();
    if (editor instanceof JCheckBox) {
    ((JCheckBox) editor).addItemListener(itemListener);
    return editor;
    class CheckBoxNode {
    String text;
    boolean selected;
    public CheckBoxNode(String text, boolean selected) {
    this.text = text;
    this.selected = selected;
    public boolean isSelected() {
    return selected;
    public void setSelected(boolean newValue) {
    selected = newValue;
    public String getText() {
    return text;
    public void setText(String newValue) {
    text = newValue;
    public String toString() {
    return getClass().getName() + "[" + text + "/" + selected + "]";
    class NamedVector extends Vector {
    String name;
    public NamedVector(String name) {
    this.name = name;
    public NamedVector(String name, Object elements[]) {
    this.name = name;
    for (int i = 0, n = elements.length; i < n; i++) {
    add(elements);
    public String toString() {
    return "[" + name + "]";

    Between when you posted the question and the entire 50 minutes you waited for an answer, I tried compiling that code you posted, with a view to help out.
    What I found was..
    That code did not compile as posted.
    - It was missing imports
    - There was a direct reference to setLayout that applied to no member
    - model was not declared properly
    It also shows unchecked add warnings, please fix those before posting.
    BTW - please do not remove indenting from posted code, it makes it very hard to read, replace any tabs in the source for 2-4 spaces instead. Also, code is easier to examine when it is enclosed in 'code' tags - this can be achieved by selecting the code and pressing the 'code' button above the form field we type the messages.
    On the subject of what you are trying to do, please trim your example down to something that tries to create this tree form any directory structure the user might specify with a JFileChooser, because I am running a slow machine with large drives, and creating a JTree of the entire file system would take far too long.
    Fix those things, and I'll take a second look.
    As an aside. If you wish to get answers 'within the hour', you will probably need a consultant or a help desk. If you post to these forums, you need to be more patient.

Maybe you are looking for

  • Menu buttons not working in Apple DVD Player

    I am having a real problem. I have a menu with three buttons. The default button takes you either of the other buttons (depending on whether you press right or down on the remote). These two buttons are auto-action and proceed imediately to other tra

  • PSE 7: Hand tool shows up for all tools

    Using PSE 7 and have used prior versions and CS2 but never saw this before. Trying to crop after entering the sizes and the hand tool appears instead of the crop box. Then, when I try others like type or brush, there is only the hand tool so these ca

  • Extra field in the WOrklist

    Hi Specialist I would like to ask about add one extra field in the layout of the worlikst. there is a field: VERZN  --> Days in Arrears by Net Due Date that I would like to add in my layout. I check by the standard way using the "change layout" but t

  • Study material for 1z0-052

    study material for1z0-052

  • HT3819 Do you have to share every single song?

    My brother and I both have iPhone's, and then all the data is on my MacBook Pro.