Dynamic JTree with checkbox

could anyone tell me how to display the c: drive in Jtree view and add check box for particular folder files

You might want to take a look here and here as a starting point.

Similar Messages

  • Displaying a jtree with checkboxes and enabling some default checkboxes

    I have created a jtree displaying a list of nodes hierarchically ,and created a checkbox for each node as well.
    My problem is having created the jtree with checkboxes i need to have some of the nodes in the hierarchy checked by default on first launch of the gui.To do this i read a list of treepaths from a file and would want to traverse the tree and enable the node after finding it,which is what i am having issue with.
    Your solution would be appreciated as i am a newbie and having got this far, feel like i need some back up :)
    Thanks & Regards
    Shashi

    I have created a jtree displaying a list of nodes hierarchically ,and created a checkbox for each node as well.
    My problem is having created the jtree with checkboxes i need to have some of the nodes in the hierarchy checked by default on first launch of the gui.To do this i read a list of treepaths from a file and would want to traverse the tree and enable the node after finding it,which is what i am having issue with.
    Your solution would be appreciated as i am a newbie and having got this far, feel like i need some back up :)
    Thanks & Regards
    Shashi

  • Using JTree with checkbox

    Hi All,
    I have a link for implementation of JTree with Checkbox
    http://www.jroller.com/santhosh/date/20050610 He has implemented exactly what i want but i am unable to understand the use of all the classes. Really difficult to understand
    So what i did was create a few objects with Checkbox class from AWT package and then added then to JTree using the DefaultMutableTreeStruture i got the tree working but not able to get the Checkboxex
    Can any one explain me how i can implement this senario
    I am trying different search creterias but unable to find a right detailed explanation to my query
    Rgds
    Aditya

    where did you find DefaultMutableTreeStructure?

  • JTREE with CheckBox Option

    Hi All,
    Can somebody help in how to add a CheckBox in JTREE node concept.
    Please let me if sites are there for the same.
    Rgds
    Sudhama

    * The CheckedTree is an extension to JTree with the additional functioanlity that
    * the nodes can be checked or unchecked using a checkbox.
    * <p>
    * Each node in the tree contains a checkbox.
    * @author anoopkc
    public class CheckedTree extends JTree {
        private CustomRenderer renderer = null;
        private List<TreePath> selectedNodes = null;
         * Initialises the checked tree
        public CheckedTree() {
            this.selectedNodes = new ArrayList<TreePath>();
            this.setTreeProperties();
         * Sets the properties of the tree
        private void setTreeProperties() {
            this.renderer = new CustomRenderer(this);
            super.setCellRenderer(renderer);
            super.getSelectionModel().setSelectionMode(4);
            super.addMouseListener(new MouseAdapter() {
                 * Handles the click on the tree nodes.
                 * When mouse is clicked on a node, the node is added in the
                 * list of selected rows in the tree.
                 * @param e
                public void mousePressed(MouseEvent e) {
                    TreePath path = getPathForLocation(e.getX(), e.getY());
                    if (path != null) {
                        addSelectedNode(path);
                        updateUI();
         * This method adds the selected path in to the list of selected nodes.
         * If the path is already exists, it is removed from the list.
         * @param path
        private void addSelectedNode(TreePath path) {
            if (selectedNodes.indexOf(path) == -1) {
                selectedNodes.add(path);
            } else {
                selectedNodes.remove(path);
         * This method checks whether a given tree path is selected or not
         * @param path
         * @return true if selected
        public boolean isSelected(TreePath path) {
            if (this.selectedNodes.indexOf(path) == -1) {
                return false;
            return true;
         * Returns the list of selected columns
         * @return list of selected columns
        public List<TreePath> getSeelctedNodes() {
            return selectedNodes;
    * This class creates the renderer for the checked tree
    * @author anoopkc
    class CustomRenderer extends JPanel implements TreeCellRenderer {
        private JLabel label = null;
        private JCheckBox checkBox = null;
        private CheckedTree tree = null;
         * Initialises the renderer
         * @param checkedTree
        public CustomRenderer(CheckedTree checkedTree) {
            this.tree = checkedTree;
            this.prepareComponent();
         * Prepares the component
        private void prepareComponent() {
            creatComponent();
            this.packComponents();
         * Creates the component
        private void creatComponent() {
            this.label = new JLabel();
            this.label.setPreferredSize(new Dimension(100, 21));
            this.label.setForeground(UIManager.getColor("Tree.textForeground"));
            this.label.setOpaque(true);
            this.checkBox = new JCheckBox();
            this.checkBox.setBackground(UIManager.getColor("Tree.textBackground"));
         * Packs the components
        private void packComponents() {
            setLayout(new GridBagLayout());
            setBackground(Color.WHITE);
            GridBagConstraints gbcCheckBox = new GridBagConstraints();
            gbcCheckBox.gridx = 0;
            GridBagConstraints gbcLabel = new GridBagConstraints();
            gbcLabel.gridx = 0;
            gbcLabel.gridx = 1;
            gbcLabel.weightx = 1;
            gbcLabel.fill = GridBagConstraints.HORIZONTAL;
            add(this.checkBox, gbcCheckBox);
            add(this.label, gbcLabel);
         * Returns the tree cell renderer component
         * @param tree
         * @param value
         * @param selected
         * @param expanded
         * @param leaf
         * @param row
         * @param hasFocus
         * @return component
        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
            TreePath path = tree.getPathForRow(row);
            label.setText(value.toString());
            label.setIcon(new ImageIcon("icons/smiley.gif"));
            if (selected) {
                label.setBackground(new Color(220, 220, 200));
            } else {
                label.setBackground(Color.WHITE);
            if (this.tree.isSelected(path)) {
                this.checkBox.setSelected(true);
            } else {
                checkBox.setSelected(false);
            return this;
    }

  • Using dynamic captions with checkboxes

    Hello.
    I want to create a list of checkboxes, according to a table I get from the context, meaning there would be as much checkboxes as the lines in the table, and their caption would be one of the table's fields.
    I turned on Show Dynamic Properties.
    First I tried it with one checkbox, with it's caption related directly to the table's field, and it worked - but with only one checkbox displaying the first line's value, of course.
    Next I put the checkbox in a subform. The subform is related to the table line, and is repeated for every row, and now the caption is only bound to the field's name, relatively.
    So the subform is repeated, but the caption doesn't change at all.
    How can it be done?
    And can I set the checkbox's caption by code? I tried, but it didn't work.
    Best regards,
    Udi.

    Hi,
    try using table control (supported in ALC 8.0) and add the checkboxe in the row.
    You can then map your data node (structure) with the table.
    Ashutosh

  • Dynamic tree with checkboxes

    hello!
    i have seen the same topic here, but i can't find it again!
    can anybody help me?

    no, i mean a "real" tree..
    or is there a possibility to show the data with spaces in front, like
    aaaa
    bbbb
    ccccc
    dddd

  • Columns selection on a dynamic ALV (With Checkbox)

    Hello all,
    I have an ALV which display one column per day chosen by the user like that:
    EMPLOYEE u2013   DAY01  u2013  DAY02   u2013 DAY03 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    Pernr/Name u2013 AUFNR1 u2013 AUFNR2 u2013 AUFNR3 u2026
    My need is to allow the user to select several employees (lines) and several days (DAY1 and DAY3) or one period (DAY1 to DAY3).
    After the selection, the user clicks on an ALV button to change the AUFNR data for all employees and days selected.
    I'm trying to add a second u2018header lineu2019 or a first line with check box (only for u2018DAYu2019 columns) but I didnu2019t find the solution.
    Could you help me?
    If needed I can post my code sample.
    Thanks in advance.
    David
    Edited by: David.pac on Dec 12, 2011 3:13 PM

    Thanks for Your help.
    The date is in fact a CHAR display (not really a date) so that is not the error.
    For your information when i select a row in the list (format char YYYYMMDD_HHMM) it seems that Apex do not catch my select in the Session state.
    I've change the item name with P2_DATE_FLOW but the problem remain.
    This is the debug log if can help
    0.03: Application 114, Authentication: CUSTOM2, Page Template: 3644802034190382
    0.06: ...Session ID 1868105032215374 can be used
    0.06: ...Application session: 1868105032215374, user=Neop
    0.06: ...Determine if user "Neop" workspace "2859608277950243" can develop application "114" in workspace "2859608277950243"
    0.06: Session: Fetch session header information
    0.06: ...Metadata: Fetch page attributes for application 114, page 3
    0.06: Fetch session state from database
    0.06: Branch point: BEFORE_HEADER
    0.06: Fetch application meta data
    0.08: Computation point: BEFORE_HEADER
    0.08: Processing point: BEFORE_HEADER
    0.08: Show page template header
    0.08: Computation point: AFTER_HEADER
    0.08: Processing point: AFTER_HEADER
    0.08: Computation point: BEFORE_BOX_BODY
    0.08: Processing point: BEFORE_BOX_BODY
    0.08: Region: Report 1
    Report 1
    0.08: show report
    0.09: determine column headings
    0.09: parse query as: CFM_MDRE
    0.12: binding: ":P2_DATE_FLOW"="P2_DATE_FLOW" value="0"
    0.14: print column headings
    0.14: rows loop: 15 row(s)
    No data found.

  • How can create a JTree with cellRender is checkbox realized multiple selec

    How can create a JTree with cellRender is checkbox realized multiple selection function.thanks for every
    one's help.

    Hi,
    1. Create a value node in your context name Table and set its cardinality to 0:n
    2. Create 2 value attributes within the Table node name value1 and value2
    3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
    you have created a table and binded its value to context
    Table UI properties
    4.Set Selection Mode to Multi
    5.Set Visible Row Count to 5
    6.ScrollableColCount to 5
    In your implemetaion, you can add values to table as follow:
    IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
    ele.setValue1(<value>);
    ele.setValue2(<value>);
    wdContext.nodeTable().addElement(ele);
    The above code will allow you to add elements to your table node.
    Regards,
    Murtuza

  • Dynamic Page with Multiple Checkboxes

    I am trying to get a dynamic page to pass the checked value of multiple checkboxes to the submit proceedure. Can anyone tell me what I am doing wrong?
    Thanks in advance,
    Pam -------------------------------------------------------------------------
    Dynamic Page:
    <HTML>
    <FORM action="scott.brsubmit" method="POST">
    <TABLE border CELLPADDING=0 CELLSPACING=0>
    <ORACLE>begin
    for c1 in (SELECT rowid,ename, job, bonus from scott.bonus_approval where approved is null)
    loop
    htp.p('<tr><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.ename);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.job);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.bonus);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="hidden" name="p_ename" value='||c1.ename||'>');
    htp.p('<input type="checkbox" name="p_cb" value="Y">');
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="checkbox" name="p_cb2" value="N">');
    htp.p('</td></tr>');
    htp.p('<br>');
    htp.p('
    end loop;
    HTP.P('</table>');
    htp.p('<p>');
    htp.p('<input type=submit value="Save" name="p_action" >');
    end;
    </ORACLE>
    </form>
    </BODY>
    </HTML>
    Procedure:
    (p_ename in portal.wwv_utl_api_types.vc_arr, p_cb in portal.wwv_utl_api_types.vc_arr, p_cb2 in portal.wwv_utl_api_types.vc_arr, p_action varchar2)
    as
    begin
    if p_action = 'Save' then
    for i in 1..p_ename.count loop
    if (p_cb(i) = 'Y') then
    update scott.bonus_approval set approved = p_cb(i) where ename = p_ename(i);
    COMMIT;
    else
    if (p_cb2(i) = 'N') then
    update scott.bonus_approval set approved = p_cb2(i) where ename = p_ename(i);
    COMMIT;
    END IF;
    end if;
    end loop;
    end if;
    htp.print('<script language="JavaScript">');
    htp.print('function display() {
    var msg = "\nRecord Saved Successfully\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display()');
    htp.print('</script>');
    exception
    when others then
    htp.print('<script language="JavaScript">');
    htp.print('function display2() {
    var msg = "\nRecord Not Saved.\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display2()');
    htp.p('Not saved');
    htp.print('</script>');
    end;

    Hi.
    I have a dynamic page, with a bind variable :v_day. On the customization screen the user can select one or more days of the week, or all days. I use this also in a report and then it works ok. In the where clause i use:
    and rtrim((to_char(date_time,'DAY'))) IN :v_day
    Date_time is a tablecolumn (date).
    When i add this line in the select script from the dynamic page, i get error:
    : ORA-06550: line 1, column 2443:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol "(" was substituted for "" to continue.
    ORA-06550: line 1, column 2606:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( ) , * @ % & - + / at mod rem <an exponent (**)> and or ||
    The symbol ")" was substituted for ";" to continue.
    ORA-06550: line 1, column 3236:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-)
    Thanks.

  • Dynamic Treeview(MyComputer) with checkbox

    could anyone tell me display the Filesystem in treeview with checkbox using Flex. i want to display the Filesystem(c:) in treeview and add checkbox
    for all files and directory is it possible, pls help me

    Actually, P1_region is one item
    But this item comes from a select query which returns more than one result
    So I have 1 item and numerous chekboxes that i can check
    I don't understand what type is your regions_selected item.
    I really think that your post is of help because I saw in the session that p1_region take a value like this: region1:region2:region3 if i select 3 regions
    My problem is now to make it become : 'region1','region2','region3'
    thx
    Jonathan

  • Problem with Checkbox and Listbox

    Hi,
    I have a jsp page named auth_Roles.jsp which has an empty Listbox and a hyperlink,on clicking the hyperlink a popup window opens up,which is a jsp page named roleSelect.jsp.In that jsp page there is a textBox and two buttons named "Search" and "Cancel".By typing something in the checkbox when you press Search button Some checkboxes get generated dynamically matching with the Search criteria in the Textbox.These textboxes are generated in a nother JSP named findRoles.jsp.this findRoles.jsp also contains two buttons of type="submit"
    Which are Save and Cancel buttons.
    Now what i need to do is when i check some of the checkboxes that are generated in findRoles.jsp and click on Save.After that the values that are checked should be there in the listbox of the first JSP page that is auth_Roles.jsp.
    Thing is that the whole thing is working but after selecting and saving some checkBox values in the first attempt(i.e when the checked values are reflecting in the ListBox of auth_Roles.jsp) if you try to select something again using the hyperlink in auth_Roles.jsp(Using the sequence of actions i have allready mentioned) the newly checked values are occupying the ListBox in auth_Roles.jsp excluding the values i have allready selected in the first attempt(i.e values selected in the latest attempts are only getting reflected and the previous values are lost from the ListBox).
    I want to retain the previously selected values,can anyone provide any code or any suggestion,am very new in java.

    Sorry,in the roleselect.jsp page i have to type a string as a search criteria in the textBox not a CheckBox.
    Apologise for the error in information.

  • Dynamic action on checkbox using jQuery selectors

    Aim: Have a classic report with a checkbox for each record that fires a dynamic action. I'd like to source the relevant ID/value within Javascript (ultimately PL/SQL)
    Consider a classic report using the following query
    SELECT label
    ,apex_item.checkbox
      (p_idx   => 15 -- f42
      ,p_value => id
      ,p_attributes => 'id="f15_'||id||'" class="xyz"'
      ) chk
    FROM   my_tableDefine a dynamic action with
    Event: Click
    Selection type: jQuery selector
    jQuery selector: .xyz
    No condition
    Scope:Bind
    I have an action executing javascript
    var me = this.triggeringElement;
    console.log('me:'||me);
    console.log('name:'||me.attr('name') );
    console.log('id:'||me.attr('id') );
    console.log('value:'||me.prop('val'));Affected elements Selection type: Triggering element
    When I run the page and check a box, the DA fires, but all output shown in the console log is blank.
    I've tried copious variations to get this right, such as using $(this.triggeringElement)
    These pages make me feel confident I have the syntax right
    http://stackoverflow.com/questions/12038392/oracle-apex-checkbox-to-manipulate-other-values-when-checked-unchecked
    http://iadviseblog.wordpress.com/2011/08/24/get-triggering-element-in-da/
    But my values are still null?! Anyone know what I've missed?
    Apex 4.1.1
    Scott

    var me = this.triggeringElement;
    console.log('me:'||me);
    console.log('name:'||me.attr('name') );
    console.log('id:'||me.attr('id') );
    console.log('value:'||me.prop('val'));<ul>
    <li>Concatenation in javascript is with +* and not *||* (which means OR)</li>
    <li>Also, this.triggeringElement is a reference to the DOM element, it is not a jQuery object. So wrapping it in $() is required when you wish to access properties through jQuery.</li>
    <li>.prop('val') won't work. You need to check for the existence of a property-line attribute, which in case of a checkbox could be "checked".</li>
    <li>dynamic action on a report: use scope Live to prevent functionality from working when the report is refreshed/paginated</li>
    </ul>
    var me = $(this.triggeringElement);
    console.log('me:'+me);
    console.log('name:'+me.attr('name') );
    console.log('id:'+me.attr('id') );
    console.log('value:'+me.prop('checked'));

  • I cant modify my CheckTree Render to be a TableTree with Checkbox ?!!

    hello everybody .. i am trying for 2 week to modify my code i wrote
    (which allows me to have a tree with a checkbox ) to have a tabletree with checkbox for each node .. plz help .. this is my checkTree renderer
    package com.kelk.cfg_util_gui;
    /* swing1.1 */
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JCheckBox;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.plaf.ColorUIResource;
    import javax.swing.tree.TreeCellRenderer;
    * @version 1.1 04/24/99
    public class CheckRenderer extends JPanel implements TreeCellRenderer {
         private static final long serialVersionUID = 1L;
         private Icon kelk = new ImageIcon("/com.kelk.cfg_util/Images/KELK32.gif");
    protected JCheckBox check;
    protected TreeLabel label;
    public CheckRenderer() {
    setLayout(null);
    add(check = new JCheckBox());
    add(label = new TreeLabel());
    check.setBackground(UIManager.getColor("Tree.textBackground"));
    label.setForeground(UIManager.getColor("Tree.textForeground"));
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean isSelected, boolean expanded,
    boolean leaf, int row, boolean hasFocus) {
    String stringValue = tree.convertValueToText(value, isSelected,
                   expanded, leaf, row, hasFocus);
    setEnabled(tree.isEnabled());
    check.setSelected(((CheckNode)value).isSelected());
    label.setFont(tree.getFont());
    label.setText(stringValue);
    label.setSelected(isSelected);
    label.setFocus(hasFocus);
    if (leaf) {
    label.setIcon(UIManager.getIcon("Tree.leafIcon"));
    //label.setBackground(Color.RED);
    } else if (expanded) {
    label.setIcon(UIManager.getIcon("Tree.openIcon"));
    } else {
    label.setIcon(UIManager.getIcon("Tree.closedIcon"));
    return this;
    public Dimension getPreferredSize() {
    Dimension d_check = check.getPreferredSize();
    Dimension d_label = label.getPreferredSize();
    return new Dimension(d_check.width + d_label.width,
    (d_check.height < d_label.height ?
    d_label.height : d_check.height));
    public void doLayout() {
    Dimension d_check = check.getPreferredSize();
    Dimension d_label = label.getPreferredSize();
    int y_check = 0;
    int y_label = 0;
    if (d_check.height < d_label.height) {
    y_check = (d_label.height - d_check.height)/2;
    } else {
    y_label = (d_check.height - d_label.height)/2;
    check.setLocation(0,y_check);
    check.setBounds(0,y_check,d_check.width,d_check.height);
    label.setLocation(d_check.width,y_label);
    label.setBounds(d_check.width,y_label,d_label.width,d_label.height);
    public void setBackground(Color color) {
    if (color instanceof ColorUIResource)
    color = null;
    super.setBackground(color);
    public class TreeLabel extends JLabel {
         private static final long serialVersionUID = 1L;
         boolean isSelected;
    boolean hasFocus;
    public TreeLabel() {
    public void setBackground(Color color) {
         if(color instanceof ColorUIResource)
         color = null;
         super.setBackground(color);
    public void paint(Graphics g) {
    String str;
    if ((str = getText()) != null) {
    if (0 < str.length()) {
    if (isSelected) {
    g.setColor(UIManager.getColor("Tree.selectionBackground"));
    } else {
    g.setColor(UIManager.getColor("Tree.textBackground"));
    Dimension d = getPreferredSize();
    int imageOffset = 0;
    Icon currentI = getIcon();
    if (currentI != null) {
    imageOffset = currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
    g.fillRect(imageOffset, 0, d.width -1 - imageOffset, d.height);
    if (hasFocus) {
    g.setColor(UIManager.getColor("Tree.selectionBorderColor"));
    g.drawRect(imageOffset, 0, d.width -1 - imageOffset, d.height -1);
    super.paint(g);
    public Dimension getPreferredSize() {
    Dimension retDimension = super.getPreferredSize();
    if (retDimension != null) {
    retDimension = new Dimension(retDimension.width + 3,
                        retDimension.height);
    return retDimension;
    public void setSelected(boolean isSelected) {
    this.isSelected = isSelected;
    public void setFocus(boolean hasFocus) {
    this.hasFocus = hasFocus;
    }

    my code i wrote did you really?
    this fellow here wrote something similar
    http://www.objects.com.au/java/examples/src/tree/CheckRenderer.java
    perhaps you can swap notes.

  • Dynamic List of Checkboxes and their Default Values

    Hello,
    I have spent more than five hours feebly attempting to figure out how to make a dynamic list of checkboxes (using an LOV) adhere to the values in the database which those checkboxes represent. The LOV itself works; I can get a nice list of checkboxes with the appropriate names, but I can't get HTML DB to check the boxes that have a value of 'Y' in the database. The code for my LOV follows:
    SELECT mesg_name n, mesg_id r
    FROM notifications
    WHERE mesg_id = (SELECT mesg_id
                      FROM subscriptions
                      WHERE upper(network_id) = upper(:APP_USER))Since this is a dynamic list of checkboxes, I obviously cannot use the "Label" property to set the labels of each checkbox. That is what n is in the query above. r is the unique ID of the message (a varchar2) that I will need to pass back to the program after the page is submitted by the user for processing. I cannot take up the value field of the checkbox with a "Y" or something as equally vague. The ID of the subscription that the user is subscribing to or unsubscribing to must be passed back to the program so the appropriate modifications to the database table can be made.
    I would most appreciate it if anyone could lend assistance.
    Thank you,
    Marc Weil

    Marc,
    I think I see what you're trying to do. You'll have to separate process that renders the LOV as a series of check boxes from the process that sets the checked values for each user.
    Before the LOV is rendered on a page, make sure you set the session state value of the LOV item to a colon separated set of IDs based on your query:
    SELECT mesg_id
    FROM subscriptions
    WHERE upper(network_id) = upper(:APP_USER)
    If you have trouble, let me know, I'll try to come up with an example.
    Sergio

  • Creating a dynamic jtree using datas retrieved by dom in xml parsing

    help me with code to create a dynamic jtree using data retrieved as nodes by xml parsing using dom

    Ok, so you want to make a tree. To determine the data that appears in a tree, you have to make a custom tree model. The API for this is at :
    http://java.sun.com/j2se/1.4.2/docs/api/
    A tutorial for using trees is at :
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    I assume you are going to be using Nodes, since you are using XML. For this I might start with something like
    class NodeTreeModel implements TreeModelI would then implement the 'getChildCount()' as the number of subnodes a node has, and the value of a tree node to the nodes value.
    Hope that starts you off.

Maybe you are looking for

  • Adf drop down list in adf  table

    hi all i m trying to create a data table that have a column on it as drop down list ,the list get the value good as bind variable passed to it and work good when create a new record but when i try to update the record always get this error <Utils><bu

  • Printing to PDF from AI makes Random Thicken Lines

    This is my first time ever posting because after seaching this forum over and over...I can't find my answer. Problem: I am working on an AI file created in CS3 that contains linework from AutoCad 2008. I did not import this linework because I didn't

  • Adf ejb jpa persistance problem

    Hi everyone, I`m a newbie to adf technology. I was trying Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces tutorial ([http://www.oracle.com/technology/obe/obe11jdev/11/ejb/ejb.html]) I have a problem when I try to run

  • TextPad or EditPlus alternative

    I have been trying to find an alternative to TextPad / EditPlus as I need to run a scripting language which is based on Java. The command which I need to run in TextPad/EditPlus is: java -verbose:gc -jar AKL.jar Test-M.webl IMAGE: From Textpad which

  • Can't get serial number

    Hello: I have purchased Adobe Photoshop Elements 11 and Adobe Premier Elements 11. It is a boxed version with DVD's to upload I am trying to get my serial number, but am having problems.  When I go to Adobe.com, it asks me to enter a serial number -