Urgent help, Tree Viewer JSP

Has anyone gotten the tree viewer bean to work on a JSP? If so, please give tips on it, or an example of table would be appreciated. I keep getting an error message that my row-set browser is not self-refferencial.
Thanks

hi vidyut, thanks for the help. was juz wondering. The file contents tt im supposed to read in and print out contains around 200 similar entries, meaning :
MEASURE Waist_Full=33.19
MEASURE Waist_Front=16.06
MEASURE Waist_Back=17.12
MEASURE Waist_Height_Front=38.82
MEASURE Waist_Height_Back=39.73
MEASURE Waist_Height_Left=39.28
MEASURE Waist_Height_Right=39.28
MEASURE Waist_Front_X=43.98
MEASURE Waist_Back_X=35.04
MEASURE Waist_Width=11.85
MEASURE Shirt_Collar=14.88
MEASURE Neck2Waist_Front=19.64so is the properties object stil the best method to use? To extract the whole string except MEASURE and '='?

Similar Messages

  • Urgent help is needed - JSP & Java beans

    Hi,
    I am getting the following problem when trying to interact with Javabeans from JSP (DB I use is Cloudscape) :
    An exception occurred while interacting with the guestbook database.
    The error message was:
    Cannot create bean of class proj.beans.UserDataBean
    Please try again later
    The problem probably occurs in following line:
    status = guestData.checkUser(userName,emailName);
    where guestData represents a Javabean class.
    The strangest thing is that sometimes, suddenly, the program is working OK without this Error Message but when it occurs I don't know the reason and how to solve it.
    Please advise...
    Thanks a lot.

    Can you copy the entire stack trace and post it? It would probably help.

  • Tree view JSp

    hai all,
    i am new to XML. I have the requirement like
    I have a tree structure with parent and child
    It goes upto 30000 records.
    User enters the text and presses submit button the
    coresponding text has to be searched in the tree structure
    and that has to be made selected.
    all the parent node which has the text as child has also
    to be populated in the List box. how can I do this.
    Is it possible to do this in client side ?
    I want help ?
    thanks
    sundar

    Internet Explorer 5 can do it on the client-side. it uses the Active-X plugin as a DOM parser....and you can use javascript with it.

  • Urgent Help:Tree structured query

    Hi,
    My requirement is as follows..
    I have two tables let's say A and B
    Table A has two fileds ID and PARENT_ID
    ID is a primary key and Parent_id is a foreign key to the same tables "ID" field(i.e, parent_id references a.id)
    Table B has 2 fields : status and id
    where ID is a foreign key to table A.id(B.id references A.ID)
    The data in those two tables looks like this
    A
    ID PARENT_ID
    1 2
    2 3
    3 4
    4
    5 6
    6 7
    7
    Table B has ..
    Status id
    Approved 1
    Approved 2
    Now I would like to select all the Approved Ids and all parent_IDs
    So i should get the following result
    id
    1
    2
    3
    4
    Can somebody help me write this query.. this is Kinda urgent Please.
    Thank you

    sql>select * from a;
           ID PARENT_ID
            1         2
            2         3
            3         4
            4
            5         6
            6         7
            7
    7 rows selected.
    sql>select * from b;
    STATUS                                ID
    Approved                               1
    Approved                               2
    2 rows selected.
    sql>select distinct id
      2    from a
      3   start with id in (select id
      4                       from b
      5                      where status = 'Approved')
      6   connect by prior parent_id = id;
           ID
            1
            2
            3
            4
    4 rows selected.

  • Urgent help needed in JSP...

    Hi,
    I have a variable declared in one of the JSP files. How can I access that variable from another JSP page?
    For ex:
    jsp1.jsp
    <%
    String hello = "Hello world!";
    %>
    jsp2.jsp
    <h3>The string is <%= hello %></h3>
    I know this code wont work. But how can I fix it?
    Please let me know your solutions as soon as possible.
    Thank you,
    Rajesh

    Thanx a lot.
    I did understand how to use session to store a java object. Actually, I wanted to use primitive data types... well, I could work around that.
    But, could you please explain what you mean by storing in the application context?
    Thanks a lot,
    Rajesh

  • Help! can i get a tree view component used in jsp ,urgent!!

    hello all
    can i get a tree view component can be used in jsp ,it gets children data from database only when user expand one node, and it must be able to add nodes or removes node by user,so i can do some post handler in my database.
    regards!

    Where did you get this tree view component?

  • Please Help(How to get RadioButtons in tree View)

    Hi.
    Sub/Requirement: How to implement RadioButtons in tree view with/without using xml file.
    I have a requirement like this i want to display RadioButton in tree view.
    I implemented tree same as which is given in sampleApplications.
    In this sampleApplications they implemted tree by using xml file.
    I also implemented tree by Generating xml file. In this xml file i get the values from the database. I am using <netui:tree > tag.
    Is it possible to implement tree without using xml file. I need to generate tree Dynamically.
    Please any one help me to come out with this solution.

    The issue here is while you are retrieving all the details, you are consistently overwriting them in the request.setAttribute() call before you get to the JSP to display them.
    Do you actually have a class/object called Student?
    That object should have attributes for classes, subjects, teachers (all of which are lists apparently)
    public class Student{
      String name;
      List classes;
      List subjects;
      List teachers;
      // appropriate getter/setter methods
    }Then you load each student, and populate its individual lists.
    That lets you pass the list of students, each student having its own lists for display.
    Hope this helps,
    evnafets

  • Pragmaticobjects : Tree view in the JSP page

    I have to understand Tree view Generation in the JSP page by using pragmaticobjects jar file.
    Can any body please help me from where I got the details of pragmaticobjects.
    I am not able to fined appropriate link in Google.
    com.pragmaticobjects.taglibs.tree.util some of the used package .

    a tree model
    wrap <ul> <ul> around all his childeren + wrap the String representation with <li> </li>
    that should provide you with the structure in html.
    <ol class="tree">
    <li>parent
      <ul>
       <li>child1.1
        <ul>
         <li>child1.1.2</li>
         <li>child1.1.2</li>
        </ul>
       </li>
       <li>child1.2
        <ul>
         <li>child1.2.1</li>
         <li>child1.2.2</li>
        </ul>
       </li>
      </ul>
    </li>
    <ul>then it's css time
    <html>
    <head>
    <style>
    <!--
    .tree {
    list-style-type: none;
    list-style-image: none;
    list-style-position: outside;
    .tree ul {
    margin: 0em;
    padding: 0em;
    .tree  li{
    border: 1px black solid;
    text-align: center;
    float: left;
    -->
    </style>
    </head>
    <body>
    <ul class="tree">
    <li>parent
      <ul>
       <li>child1.1
        <ul>
         <li>child1.1.2</li>
         <li>child1.1.2</li>
        </ul>
       </li>
       <li>child1.2
        <ul>
         <li>child1.2.1</li>
         <li>child1.2.2</li>
        </ul>
       </li>
      </ul>
    </li>
    <ul>
    </body>
    </html>from here well there are differend solutions, but I think a little too CSS orientated to discuss it here. if you need more details email I'm not sure if I check this topic again.
    Mr_Light
    stuurff [at] hotmail.com

  • How to display an xml file contents in jsp as tree view

    hi,
    Iam trying to read an xml file and display the structure in jsp as tree view, can any one help me

    Use a [XML or DOM parser|http://java-source.net/open-source/xml-parsers] to read a XML file into a tree structure of Java objects.
    Use the [Collections API|http://java.sun.com/docs/books/tutorial/collections/index.html] to get hold of the relevant elements in a tree structure.
    Use JSTL´s [c:forEach|http://java.sun.com/javaee/5/docs/tutorial/doc/bnakh.html] tag to iterate over a Collection in JSP.
    Use HTML´s [<ul>/<li>|http://www.w3.org/TR/REC-html40/struct/lists.html#h-10.2] or [<dl>/<dt>/<dd>|http://www.w3.org/TR/REC-html40/struct/lists.html#h-10.3] tags to represent a tree in HTML.

  • A tree-view in HTML page with nodes generated with java script in run time is not visible in the UI Automation Tree. Need Help

    I have a HTML page with an IFrame. Inside the Iframe there is a table with a tree view
    <iframe>
    <table>
    <tr>
    <td>
    <treeview id="tv1"></treeview>
    </td>
    </tr>
    </table>
    </iframe>
    In UIA, i am able to traverse till the tree view but not able to see it.
    I have used the TreeWalker.RawViewWalker Field to traverse the node from the desktop Automation.RootElement. 
    I tried to use AutomationElement.FromPoint method to check whether i am able to get that element. Fortunately i was able to get the automation element. 
    i tried to get the path to root element from the node element using the TreeWalker.RawViewWalker. I was able to get the parent path to the root element.
    But trying the reverse way like navigating from root element to tree node, was not getting the element for me. 
    Please help me with suggestions or inputs to resolve this issue. 

    Thanks Bernard,
    It works fine with JInitiator but not working with
    the JPI. For JPI what settings I need to do ??hi TKARIM and Bernard, i am having similar problem even with the Bernard's recommended setup. could you post the webutiljini.htm (i presume you are using config=test) ?
    i am actually using jinitiator 1.3.1.28 with Oracle HTTP Server of OAS 10gR2) calling Forms Server 6i (f60cgi). After setting up according to Bernard's recommended setup steps, the java console showed that it loaded the icon jar file when it could not read the form, but it skipped the loading of the icon jar file once it read and started the form. How do we specify in the form to pick up the icon from the jar file instead from a directory ? Or do we need to specify ? Any ideas ?
    Thx and Regards
    dkklau

  • How to design tree view in jsp

    Hi,
    New to jsp.How can i create a tree view in jsp.Just like mail.yahoo.com folders tree.Pls give me some code.
    Thanks

    you can try the following open source ,it supply an open source Treebean and some examples www.CoolServlets.com Check out "CSTreeBean"

  • Tree View through JSP and Java Script

    Hi,
    I am looking for code or ideas of a Tree Structure as shown in in the left side frame of admin console of Sun App server 7 on the browser. I need to create a tree structure which will work on the browser like it works on the Sun App Server 7 admin console. If you had any idea or code, please share with me. I would like to have some idea before I start building it. The tree will be build from the database. So any database design is also helpful. I am planning to have that tree using JSP and EJB.
    Please help. If you are not clear what I am looking for, then please drop a line in this forum, so that I can explain it fine.
    Thanks in advance.
    Amit

    You can use the JSP Tree Tag I have developed. This helps you both structuring the tree model itself + it takes care of displaying the tree in a nice way. You can change all HTML code used to display the tree. Also you can build trees dynamically instead of just displaying static trees. Take a look at it here:
    http://www.jenkov.dk/projects/treetag/treetag.jsp
    Kind Regards,
    Jakob Jenkov

  • How to add Icon in Tree View in Forms 6.0 (URGENT..!)

    Hello All,
    I want to add icons in tree view (hierarchical tree) by using
    forms 6.0.
    So pls. help me to find out the solution for the same.
    thanks
    Pradeep
    null

    Pradeep (guest) wrote:
    : Hello All,
    : I want to add icons in tree view (hierarchical tree) by using
    : forms 6.0.
    : So pls. help me to find out the solution for the same.
    : thanks
    : Pradeep
    hello pradeep,
    for adding icons in the tree, u willhave to look closely to the
    data format for the tree.in the data format used for populating
    the tree we are supplying 5 fields. the state of the tree node
    (expanded or collapsed), the depth of the node w.r.t the parent
    node, the node value, the node label(what we see on the tree)
    and the node icon which we want to use. for the node icon we
    have to provide the entire path of the icon file. that's it.
    hope this will solve the problem
    null

  • Menus, Tabs and Tree Views I need some help

    heya,
    I am quite new here! I was searching desperately on a solution on how to fix my code. I need to do a menu in Java and bellow two boxes, one in which I will display a static tree structure (on the left side of the window) and one where I have some tabs (on the irght side of the window).
    Now, today I was playing around with the tree structure view and also trying to use modules in my code for a more easy debugging and understanding later on and I managed to screw up the functionality for good :D.
    Please some help, where am I going wrong and what is missing in my application.
    Here are my 4 files:
    ______File ModulMeniu____________
    package modules;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.BorderFactory;
    import javax.swing.border.Border;
    import javax.swing.JTabbedPane;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.JToolBar;
    import javax.swing.JButton;
    import javax.swing.ImageIcon;
    import javax.swing.JMenuItem;
    import javax.swing.JCheckBoxMenuItem;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.UIManager;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeSelectionEvent;
    import javax.swing.event.TreeSelectionListener;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.net.URL;
    import java.io.IOException;
    public class ModulMeniu extends JPanel {
    protected Action loadConfigurationAction, saveConfigurationAction, stopAction, continueAction, exitAction, newFilterAction, allFiltersSentAction;
    protected Action currentFilterAction, allComputersAction, probesAction, deleteAction, resetAction, hideComputersAction, backgroundAction;
    protected Action computerAction, filterAction, searchFilterByNameAction, searchPackageByPositionAction, deleteFilterAndRuleAction ;
    public ModulMeniu() {
    //Creates the actions shared by the toolbar and menu.
    loadConfigurationAction = new LoadConfigurationAction("Load Configuration",
    "This allows to load a previous configuration.",
    new Integer(KeyEvent.VK_L));
    saveConfigurationAction = new SaveConfigurationAction("Save Configuration",
    "This allows to save the current configuration.",
    new Integer(KeyEvent.VK_S));
    stopAction = new StopAction( "Stop",
    "This stops the Client.",
    new Integer(KeyEvent.VK_T));
    continueAction = new ContinueAction( "Continue",
    "This continues the traffic observing where we left on.",
    new Integer(KeyEvent.VK_C));
    exitAction = new ExitAction( "Exit",
    "This exits the Application.",
    new Integer(KeyEvent.VK_E));
    newFilterAction = new NewFilterAction( "New Filter",
    "This creates a new filter.",
    new Integer(KeyEvent.VK_N));
              allFiltersSentAction = new AllFiltersSentAction( "All Filters Sent",
    "This displays all the filters sent.",
    new Integer(KeyEvent.VK_A));
    currentFilterAction = new CurrentFilterAction( "Current Filter",
    "This displays the current filter.",
    new Integer(KeyEvent.VK_C));
    allComputersAction = new AllComputersAction( "All Computers",
    "This displays all the computers in the network.",
    new Integer(KeyEvent.VK_L));
    probesAction = new ProbesAction( "Probes",
    "This displays all the probes in the network.",
    new Integer(KeyEvent.VK_P));
    deleteAction = new DeleteAction( "Delete",
    "This deletes the filter.",
    new Integer(KeyEvent.VK_D));
    resetAction = new ResetAction( "Reset",
    "This resets the client.",
    new Integer(KeyEvent.VK_R));
    hideComputersAction = new HideComputersAction( "Hide Computers",
    "This hides given computers.",
    new Integer(KeyEvent.VK_H));
    backgroundAction = new BackgroundAction( "Background",
    "This sets the background color.",
    new Integer(KeyEvent.VK_B));
    computerAction = new ComputerAction( "Computer",
    "This sets the computer color.",
    new Integer(KeyEvent.VK_C));
    filterAction = new FilterAction( "Filter",
    "This sets the filter color.",
    new Integer(KeyEvent.VK_F));
    searchFilterByNameAction = new SearchFilterByNameAction( "Search Filter By Name",
    "This searches a filter by its name.",
    new Integer(KeyEvent.VK_F));
    deleteFilterAndRuleAction = new DeleteFilterAndRuleAction( "Delete Filter And Rule",
    "This deletes a filter or a rule.",
    new Integer(KeyEvent.VK_D));
    public JMenuBar createMenuBar() {
    JMenuItem menuItem = null;
    JMenuBar menuBar;
    //Create the menu bar.
    menuBar = new JMenuBar();
    //Create the first menu.
    JMenu fileMenu = new JMenu("File");
    JMenu setMenu = new JMenu("Set");
    JMenu viewMenu = new JMenu("View");
    JMenu optionsMenu = new JMenu("Options");
    JMenu colorsMenu = new JMenu("Colors");
    JMenu searchMenu = new JMenu("Search");
    JMenu deleteMenu = new JMenu("Delete");
    Action[] actions1 = {loadConfigurationAction, saveConfigurationAction, stopAction, continueAction, exitAction};
    for (int i = 0; i < actions1.length; i++) {
    menuItem = new JMenuItem(actions1);
    fileMenu.add(menuItem);
    Action[] actions2 = {newFilterAction};
    menuItem = new JMenuItem(actions2[0]);
    setMenu.add(menuItem);
    Action[] actions3 = {allFiltersSentAction, currentFilterAction, allComputersAction, probesAction};
    for (int j = 0; j < actions3.length; j++) {
    menuItem = new JMenuItem(actions3[j]);
    viewMenu.add(menuItem);
    Action[] actions4 = {deleteAction, resetAction, hideComputersAction};
    for (int i = 0; i < actions4.length; i++) {
    menuItem = new JMenuItem(actions4[i]);
    optionsMenu.add(menuItem);
    Action[] actions5 = {backgroundAction, computerAction, filterAction};
    for (int i = 0; i < actions5.length; i++) {
    menuItem = new JMenuItem(actions5[i]);
    colorsMenu.add(menuItem);
    Action[] actions6 = {searchFilterByNameAction};
    menuItem = new JMenuItem(actions6[0]);
    searchMenu.add(menuItem);
    Action[] actions7 = {deleteFilterAndRuleAction};
    menuItem = new JMenuItem(actions7[0]);
    deleteMenu.add(menuItem);
    //Set up the menu bar.
    menuBar.add(fileMenu);
    menuBar.add(setMenu);
    menuBar.add(viewMenu);
    menuBar.add(optionsMenu);
    menuBar.add(colorsMenu);
    menuBar.add(searchMenu);
    menuBar.add(deleteMenu);
    return menuBar;
    public class LoadConfigurationAction extends AbstractAction {
    public LoadConfigurationAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class SaveConfigurationAction extends AbstractAction {
    public SaveConfigurationAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class StopAction extends AbstractAction {
    public StopAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class ContinueAction extends AbstractAction {
    public ContinueAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class ExitAction extends AbstractAction {
    public ExitAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class NewFilterAction extends AbstractAction {
    public NewFilterAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class AllFiltersSentAction extends AbstractAction {
    public AllFiltersSentAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class CurrentFilterAction extends AbstractAction {
    public CurrentFilterAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class AllComputersAction extends AbstractAction {
    public AllComputersAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class ProbesAction extends AbstractAction {
    public ProbesAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class DeleteAction extends AbstractAction {
    public DeleteAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class ResetAction extends AbstractAction {
    public ResetAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class HideComputersAction extends AbstractAction {
    public HideComputersAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class BackgroundAction extends AbstractAction {
    public BackgroundAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class ComputerAction extends AbstractAction {
    public ComputerAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class FilterAction extends AbstractAction {
    public FilterAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class SearchFilterByNameAction extends AbstractAction {
    public SearchFilterByNameAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    public class DeleteFilterAndRuleAction extends AbstractAction {
    public DeleteFilterAndRuleAction(String text,String desc, Integer mnemonic) {
    super(text);
    putValue(SHORT_DESCRIPTION, desc);
    putValue(MNEMONIC_KEY, mnemonic);
    public void actionPerformed(ActionEvent e) {
    ___FIle ModulTabbedArea________
    //pls consider I have all the imports of the first file
    public class ModulTabbedArea extends JPanel{
         public JTabbedPane tabbedPane;
         public ModulTabbedArea(){
         public JTabbedPane createTabbedArea(){
    Border paneEdge = BorderFactory.createEmptyBorder(0,10,10,10);
    JPanel IP = new JPanel();
    IP.setBorder(paneEdge);
    IP.setLayout(new BoxLayout(IP,BoxLayout.Y_AXIS));
    JPanel TCP = new JPanel();
    TCP.setBorder(paneEdge);
    TCP.setLayout(new BoxLayout(TCP,BoxLayout.Y_AXIS));
    JPanel UDP = new JPanel();
    UDP.setBorder(paneEdge);
    UDP.setLayout(new BoxLayout(UDP,BoxLayout.Y_AXIS));
    JPanel ICMP = new JPanel();
    ICMP.setBorder(paneEdge);
    ICMP.setLayout(new BoxLayout(ICMP,BoxLayout.Y_AXIS));
    JPanel ARP = new JPanel();
    ARP.setBorder(paneEdge);
    ARP.setLayout(new BoxLayout(ARP,BoxLayout.Y_AXIS));
    JPanel RARP = new JPanel();
    RARP.setBorder(paneEdge);
    RARP.setLayout(new BoxLayout(RARP,BoxLayout.Y_AXIS));
    JPanel UNKNOWN = new JPanel();
    UNKNOWN.setBorder(paneEdge);
    UNKNOWN.setLayout(new BoxLayout(UNKNOWN,BoxLayout.Y_AXIS));
    JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.addTab("IP", null, IP, null);
    tabbedPane.addTab("TCP", null, TCP, null);
    tabbedPane.addTab("UDP", null, UDP, null);
    tabbedPane.addTab("ICMP", null, ICMP, null);
    tabbedPane.addTab("ARP", null, ARP, null);
    tabbedPane.addTab("RARP", null, RARP, null);
    tabbedPane.addTab("UNKNOWN", null, UNKNOWN, null);
    return(tabbedPane);
    ___File ModulTree____
    //all the imports and the import of the package above
    public class ModulTree extends JPanel implements TreeSelectionListener {
    public JTree tree;
    private boolean DEBUG = false;
    public ModulTree() {
    //Create the nodes.
    DefaultMutableTreeNode top =new DefaultMutableTreeNode("Computers:");
    createNodes(top);
    //Create a tree that allows one selection at a time.
    tree = new JTree(top);
    tree.getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION);
    //Listen for when the selection changes.
    tree.addTreeSelectionListener(this);
    /** Required by TreeSelectionListener interface. */
    public void valueChanged(TreeSelectionEvent e) {
    DefaultMutableTreeNode node = (DefaultMutableTreeNode)
    tree.getLastSelectedPathComponent();
    if (node == null) return;
    Object nodeInfo = node.getUserObject();
    if (node.isLeaf()) {
    IPInfo ipAndName = (IPInfo)nodeInfo;
    if (DEBUG){           
    if (ipAndName.name==""){
         System.out.println(ipAndName.ip+ ": \n ");
    else {
    System.out.print(ipAndName.ip + ipAndName.name + ": \n ");
    if (DEBUG) {
    System.out.println(nodeInfo.toString());
    private class IPInfo {
    public String ip;
    public String name;
    public IPInfo(String adresaIP, String numeleComputerului) {
    ip=adresaIP;
    name=numeleComputerului;
    public String toString() {
    return ip + name;
    private void createNodes(DefaultMutableTreeNode top) {
    DefaultMutableTreeNode category = null;
    DefaultMutableTreeNode ipAndName = null;
    category = new DefaultMutableTreeNode("Computers in the Network");
    top.add(category);
    ipAndName = new DefaultMutableTreeNode(new IPInfo
    ("216.27.61.137",
    "Artemis"));
    category.add(ipAndName);
    ipAndName = new DefaultMutableTreeNode(new IPInfo
    ("216.32.61.132",
    "Venus"));
    category.add(ipAndName);
    ipAndName = new DefaultMutableTreeNode(new IPInfo
    ("216.132.61.11",
    "Zeus"));
    category.add(ipAndName);
    category = new DefaultMutableTreeNode("Probes in the Network");
    top.add(category);
    ipAndName = new DefaultMutableTreeNode(new IPInfo
    ("10.11.11.1",
    "Probe1"));
    category.add(ipAndName);
    ipAndName = new DefaultMutableTreeNode(new IPInfo
    ("10.11.1.1",
    "Probe2"));
    category.add(ipAndName);
    __File ModulMain___
    //all the imports and imports also modules.*
    public class ModulMain extends JFrame{
         public ModulMain(){
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("Sistem grafic de monitorizare a unei retele");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create/set menu bar and content pane.
    ModulMeniu menu = new ModulMeniu();
    frame.setJMenuBar(menu.createMenuBar());
    //Create the scroll pane and add the tree to it.
    JScrollPane treeView = new JScrollPane(tree);
    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setLeftComponent(treeView);
    splitPane.setRightComponent(tabbedPane);
    Dimension minimumSize = new Dimension(100, 50);
    tabbedPane.setMinimumSize(minimumSize);
    treeView.setMinimumSize(minimumSize);
    splitPane.setDividerLocation(100); //XXX: ignored in some releases
    //of Swing. bug 4101306
    //workaround for bug 4101306:
    //treeView.setPreferredSize(new Dimension(100, 100));
    splitPane.setPreferredSize(new Dimension(500, 300));
    //Add the split pane to this panel.
    add(splitPane);
    menu.setOpaque(true); //content panes must be opaque
    frame.setContentPane(menu);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    This is it guys! The code is not hard, just long and I need to deliver this project and I just dunno what to do to it to make it work :(. I appreciate any help I can get :p.
    THANK YOU for your time!
    Cristina

    hey friend,
    i don't have solution to your problem but i am facing the same problem in my project, i need to fetch filenames from folder and show it in a tree view. if you have any solution then please refer me with code..!1
    thanx in advance..

  • Suggestion:  Mark "Helpful" & "Solved" Posts As Such in Tree View

    The subject line says it all pretty much.
    It would be helpful if, when viewing a thread in Tree View, one could easily pick out which, if any, posts had been marked "Helpful" and "Solved" by the OP.
    Thank you.

    JDee,
    Good suggestion. We have put it on the tracker.
    Thank you,
    Mark W.
    Apple Discussions

Maybe you are looking for

  • Pricing condition records maintanence

    Hello All, We have a requirement to store the pricing condition records in 3 decimal places say 1.733 instead of 1.73 that way standard SAP is doing. Do we have any solution for this? Can we maintain the pricing condition records in 3 decimal places?

  • How can I print my document from Adobe?

    I have just upgraded from XPS to Windows 8 and I have documents in Adobe PDF, how can I get Adobe to respond to my print command?

  • 4.2.1 stops and freezes my iPad it wont do a complete update !!!

    After finding 4.2.1 eventually I sat my iPad on the desk and left it...coming back to it I find that it wont go past 75% and it just keeps freezing...my poor iPad. !!!!!!

  • Please help ,GR not able to Print

    Hi Gurus , I would really appriciate if you could help me to fix this problem , User is not able to print GR document . Thanks in advance.

  • IOS restauration il c est active plus ! :( aide moi svp!

    apres une mise a jour d mon IOS mon telefon reste non active un mesage c afiche "votre iphone n a pas pu etre active car le serveur d activation est momentan indisponoble essayez de conecter votre iphone a iTunes pour l activer ou reessayez dans deux