Displaying the output on the frame instead of a console

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 1263 Views - Last Post: 24 May 2011 - 10:45 AM Rate Topic: -----

#1 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Displaying the output on the frame instead of a console

Posted 23 May 2011 - 07:57 AM

login.java is my java file..................The code works perfectly for a console . But I need to get the workspaces part on the frame.
Please do help me!!!!
 package sage;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.TreeMap;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.MutableTreeNode;
import javax.swing.tree.TreeModel;

import javax.swing.*;
import javax.swing.tree.TreeModel;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import org.apache.xerces.parsers.SAXParser;

public class Login extends JFrame implements ActionListener {
    private static final long serialVersionUID = 1L;
    JButton OK;
    JButton Cancel;
    JPanel panel;
    JLabel banner;
    JTextField text1, text2;
    JLabel label1, label2, label3, label4;
    private Object e;
    private String sessionToken;
    private Object token;
    private String p;
    private String wordString;
    private Object answer;
    public String tokenValue;
    public String abc;
    public String id , name;

    public String str1;
    public Login() {
        JFrame frame = new JFrame("Login");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();
        panel.setLayout(null);
        JLabel banner = new JLabel("Login");
        banner.setFont(new Font("SansSerif", Font.BOLD, 28));
        banner.setBackground(Color.lightGray);
        banner.setForeground(Color.WHITE);
        banner.setOpaque(true);
        banner.setPreferredSize(new Dimension(100, 1000));
        JLabel label4 = new JLabel("Enter your user name and Password");
        label4.setFont(new Font("SansSerif", Font.BOLD, 14));
        JLabel label1 = new JLabel("Name");
        label1.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JTextField field1 = new JTextField(20);
        JLabel label2 = new JLabel("Password");
        label2.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JPasswordField field2 = new JPasswordField(20);
        JCheckBox chk = new JCheckBox("Remember Password");
        chk.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JButton button1 = new JButton("OK");
        JButton button2 = new JButton("Cancel");
        banner.setBounds(10, 10, 440, 35);
        label4.setBounds(20, 50, 400, 50);
        label1.setBounds(60, 90, 100, 50);
        field1.setBounds(140, 100, 200, 25);
        label2.setBounds(60, 130, 120, 50);
        field2.setBounds(140, 150, 200, 25);
        chk.setBounds(50, 180, 300, 50);
        button1.setBounds(230, 230, 100, 25);
        button2.setBounds(350, 230, 100, 25);
        panel.add(banner);
        panel.add(label4);
        panel.add(label1);
        panel.add(label2);
        panel.add(field1);
        panel.add(field2);
        panel.add(chk);
        panel.add(button1);
        panel.add(button2);
        frame.add(panel);
        frame.setSize(470, 300);
        frame.setVisible(true);
        frame.setResizable(false);
        button1.addActionListener(this);

    }

    public void actionPerformed(ActionEvent ae) {
        
        
        String data = "username & Password ";
        String line = "";

        try {
            // Send the request
            URL url = new URL(
                    "http://dakota-msiley.cwru.edu/remote/login/superman4@example.com/swordfish");
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            OutputStreamWriter writer = new OutputStreamWriter(conn.
                    getOutputStream());
            // Get the response
            StringBuffer answer = new StringBuffer();
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                answer.append(line);
            }

            writer.close();
            reader.close();
           //Output the response
            System.out.println(answer.toString());
            String str = answer.toString();
            tokenValue = str.substring(str.indexOf("<token>") + 7,
                                       str.indexOf("</token>"));
            System.out.println(tokenValue);
sendPostRequest();
            
        } catch (MalformedURLException ex) {

        } catch (IOException ex) {

        }
         
    }

    /**
     * XMLTreeView
     */
    //  private void XMLTreeView() {
    //  }

    // login - hit OK
    // http://dakota-swetha.cwru.edu/remote/login/superman4@example.com/swordfish
    // <token>LKJLJFDKJ</token>
    // set token in an instance variable

  public void sendPostRequest() {
 String data = "username & Password ";
            String line = "";

            try {
                // Send the request
                URL url = new URL(
                        "http://dakota-msiley.cwru.edu/remote/workspaces/" +
                        tokenValue);
                URLConnection conn = url.openConnection();
                conn.setDoOutput(true);

                //write parameters

                // Get the response
                //  StringBuffer answer = new StringBuffer();

                StringBuffer answer = new StringBuffer();
                BufferedReader reader = new BufferedReader(new InputStreamReader(
                        conn.getInputStream()));
                while ((line = reader.readLine()) != null) {
                    answer.append(line);
                }

                //Output the response
                System.out.println(answer.toString());
              //  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);




                 //root.add(workspaces);



            } catch (MalformedURLException ex) {
                ex.printStackTrace();
            } catch (IOException ex)

            {

                ex.printStackTrace();

            }
        }



    public static void main(String[] args) {
        Login login = new Login();

    }


When I execute this : I get a Login frame with a login and password fields , i enter them and i get hte output as
<?xml version="1.0" encoding="UTF-8" ?><login> <token>Cs072tMCQ9f1z9bu7fCP</token></login>
Cs072tMCQ9f1z9bu7fCP
<?xml version="1.0" encoding="UTF-8" ?><workspaces> <workspace> <id>1</id> <name>Mike Siley</name> <workspaces> <workspace> <id>16</id> <name>Child WS</name> <workspaces> <workspace> <id>17</id> <name>Child 1</name> <workspaces> <workspace> <id>18</id> <name>Child 2</name> </workspace> </workspaces> </workspace> </workspaces> </workspace> </workspaces> </workspace> <workspace> <id>9</id> <name>Test me 35</name> <workspaces> <workspace> <id>34</id> <name>Daughter</name> <workspaces> <workspace> <id>41</id> <name>Another Child</name> </workspace> </workspaces> </workspace> <workspace> <id>52</id> <name>Test Child</name> </workspace> </workspaces> </workspace> <workspace> <id>11</id> <name>Test me 35</name> </workspace> <workspace> <id>13</id> <name>WS 84</name> </workspace> <workspace> <id>14</id> <name>WS 87</name> </workspace> <workspace> <id>15</id> <name>WS 8383</name> </workspace> <workspace> <id>39</id> <name>Test WS 101</name> </workspace> <workspace> <id>53</id> <name>KCC_TEST_11JAN2011</name> <workspaces> <workspace> <id>54</id> <name>ASCHNELL</name> <workspaces> <workspace> <id>55</id> <name>kccws</name> </workspace> </workspaces> </workspace> </workspaces> </workspace></workspaces>

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: Displaying the output on the frame instead of a console

#2 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 292
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 08:28 AM

so... what's the problem? Is that data at the bottom how your info is read or how you would like it to be read? Your GUI display works but something in the Action Listener isn't? What errors are you receiving?
Was This Post Helpful? 0
  • +
  • -

#3 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 08:45 AM

View PostLuckless, on 23 May 2011 - 08:28 AM, said:

so... what's the problem? Is that data at the bottom how your info is read or how you would like it to be read? Your GUI display works but something in the Action Listener isn't? What errors are you receiving?


I get that complete output ( this output is correct) in the console and not on the Frame. I need to get the second part what is there in the SendPostRequest on the Frame.

I am very much new to java and I just got a job. Please help me!!!!
Was This Post Helpful? 0
  • +
  • -

#4 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:07 AM

Firstly, dont use a null layout when making a gui. You will have issues with this layout when it comes to displaying the app on different resolutions. To get your output onto the frame, you need somthing to hold it. Create a JTextArea, add it to a panel, and instead of doing System.out.println.... do myTextArea.setText(answer.toString());

(Thats assuming you call your JTextArea myTextArea)
Was This Post Helpful? 2
  • +
  • -

#5 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:18 AM

View Postnick2price, on 23 May 2011 - 09:07 AM, said:

Firstly, dont use a null layout when making a gui. You will have issues with this layout when it comes to displaying the app on different resolutions. To get your output onto the frame, you need somthing to hold it. Create a JTextArea, add it to a panel, and instead of doing System.out.println.... do myTextArea.setText(answer.toString());

(Thats assuming you call your JTextArea myTextArea)



Hi nick2price, thankyou for your reply!!!!
When i try to do whatyou have told ....Even my login window goes away and I just get a plain frame.

First when i execute ,I will get aframe named LOGIN with 2 fields and once i login , i get a token and then with that token value , i get the information onto the console. What I have done is correct as for the console.
But I need to get the information which is exactly inteh part of SendPostRequest() part. That part should be displayed on the frame after i login.
Was This Post Helpful? 0
  • +
  • -

#6 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:26 AM

I would test it out, but I dont have some of them libraries your using on this computer at the moment. Getting it to display will be no problem. You can do it the way I suggest, but then if what you are originally displaying is a login screen, it would make no sense placing a text field there.
Can you just make sure we are on the correct track here before advise is given. Currently, you have a login screen. When they login, something appears and you want to add something to it? Or is it when they log in, you want to then remove the login frame, and replace it with a new frame which displays the content of that method you mentioned?
Was This Post Helpful? 0
  • +
  • -

#7 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:30 AM

View Postnick2price, on 23 May 2011 - 09:26 AM, said:

I would test it out, but I dont have some of them libraries your using on this computer at the moment. Getting it to display will be no problem. You can do it the way I suggest, but then if what you are originally displaying is a login screen, it would make no sense placing a text field there.
Can you just make sure we are on the correct track here before advise is given. Currently, you have a login screen. When they login, something appears and you want to add something to it? Or is it when they log in, you want to then remove the login frame, and replace it with a new frame which displays the content of that method you mentioned?


Hey nick2less,

Yes , I have a Login Screen.
I dont want to add anything to it.

Yes , Once I login , this login screen should go off and it should have a new frame

with that information what i get after login.

I dont necessarily need the token to be displayed on the frame but i just need what is there inside that token.

actaully i am new to java and have tried various methods thru google.

I need to show it by today afternoon .

Please do help me!!!!!
Was This Post Helpful? 0
  • +
  • -

#8 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:39 AM

One option you have is to use a LayeredPane. Take a look here on how to do it.
HERE

I am just running through some of my old code cos I had what I think is a better way of doing this using a JDialog. Will post it once i find it.
Was This Post Helpful? 0
  • +
  • -

#9 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:43 AM

View Postnick2price, on 23 May 2011 - 09:39 AM, said:

One option you have is to use a LayeredPane. Take a look here on how to do it.
HERE

I am just running through some of my old code cos I had what I think is a better way of doing this using a JDialog. Will post it once i find it.


Layered pane...Where exactly should i use it. I am very new to java so please help me out...........


Thankyou!!!
Was This Post Helpful? 0
  • +
  • -

#10 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 09:55 AM

Ok, trying to think of the best way to do this as your code isnt seperated into seperate classes. Try this. In that method you want printed in a new frame, add this code
setVisible(false);
JPanel myPanel = new JPanel();
JTextField tField = new JTextField(20,20);
myPanel .add(tField);
JDialog dialog = new JDialog(this, "new panel", true);
dialog.add(myPanel);
dialog.pack();
dialog.setVisible(true);
this.dispose();


See if this does anything.
Was This Post Helpful? 0
  • +
  • -

#11 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 10:47 AM

View Postnick2price, on 23 May 2011 - 09:55 AM, said:

Ok, trying to think of the best way to do this as your code isnt seperated into seperate classes. Try this. In that method you want printed in a new frame, add this code
setVisible(false);
JPanel myPanel = new JPanel();
JTextField tField = new JTextField(20,20);
myPanel .add(tField);
JDialog dialog = new JDialog(this, "new panel", true);
dialog.add(myPanel);
dialog.pack();
dialog.setVisible(true);
this.dispose();


See if this does anything.



I tried doing it as below :
 public void sendPostRequest() {
        setVisible(false);
        JPanel myPanel = new JPanel();
        JTextField tField = new JTextField(20);
        myPanel.add(tField);
        JDialog dialog = new JDialog(this, "new panel", true);
        dialog.add(myPanel);
        dialog.pack();
        dialog.setVisible(true);
        this.dispose();

        String data = "username & Password ";
        String line = "";

        try {
            // Send the request
            URL url = new URL(
                    "http://dakota-msiley.cwru.edu/remote/workspaces/" +
                    tokenValue);
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);

            //write parameters

            // Get the response
            //  StringBuffer answer = new StringBuffer();

            StringBuffer answer = new StringBuffer();
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                answer.append(line);
            }

            //Output the response
            myTextArea.setText(answer.toString());
            //  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //root.add(workspaces);

        } catch (MalformedURLException ex) {
            ex.printStackTrace();
        } catch (IOException ex)

        {

            ex.printStackTrace();

        }
    }


Once i login , I get a small frame with a texxtfield.

This post has been edited by macosxnerd101: 23 May 2011 - 09:04 PM
Reason for edit:: Please use code tags

Was This Post Helpful? 0
  • +
  • -

#12 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 23 May 2011 - 10:55 AM

Once I login with superman4@gmail.com and password : swordfish ......I need to get a token and that token is parsed and
the xml file url : http://dakota-msiley...mote/workspaces + that particular token number should be read and displayed on the frame.

<?xml version="1.0" encoding="UTF-8" ?>
<workspaces>
  
     <workspace>
       <id>1</id>
       <name>Mike Siley</name>
       <workspaces>
         <workspace>
            <id>16</id>

            <name>Child WS</name>
            <workspaces>
              <workspace>
                 <id>17</id>
                 <name>Child 1</name>
                 <workspaces>
                   <workspace>

                      <id>18</id>
                      <name>Child 2</name>
                    </workspace>
                 </workspaces>
               </workspace>
            </workspaces>
          </workspace>
       </workspaces>

     </workspace>
     <workspace>
       <id>9</id>
       <name>Test me 35</name>
       <workspaces>
         <workspace>
            <id>34</id>

            <name>Daughter</name>
            <workspaces>
              <workspace>
                 <id>41</id>
                 <name>Another Child</name>
               </workspace>
            </workspaces>

          </workspace>
          <workspace>
            <id>52</id>
            <name>Test Child</name>
          </workspace>
       </workspaces>
     </workspace>
     <workspace>

       <id>11</id>
       <name>Test me 35</name>
     </workspace>
     <workspace>
       <id>13</id>
       <name>WS 84</name>
     </workspace>

     <workspace>
       <id>14</id>
       <name>WS 87</name>
     </workspace>
     <workspace>
       <id>15</id>
       <name>WS 8383</name>

     </workspace>
     <workspace>
       <id>39</id>
       <name>Test WS 101</name>
     </workspace>
     <workspace>
       <id>53</id>

       <name>KCC_TEST_11JAN2011</name>
       <workspaces>
         <workspace>
            <id>54</id>
            <name>ASCHNELL</name>
            <workspaces>
              <workspace>

                 <id>55</id>
                 <name>kccws</name>
               </workspace>
            </workspaces>
          </workspace>
       </workspaces>
     </workspace>
</workspaces>


This post has been edited by macosxnerd101: 23 May 2011 - 09:05 PM
Reason for edit:: Please use code tags

Was This Post Helpful? 0
  • +
  • -

#13 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 24 May 2011 - 07:08 AM

I have a code which executes perfectly but the output on the GUI i get is not in a formatted order.
I just need it as a tree structure.

package sage;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;

import javax.swing.*;

public class Login extends JFrame implements ActionListener {
    private static final long serialVersionUID = 1L;
    JButton OK;
    JButton Cancel;
    JPanel panel;
    JLabel banner;
    JTextField text1, text2;
    //JTextField tField;
    JLabel label1, label2, label3, label4;
    private Object e;
    private String sessionToken;
    private Object token;
    private String p;
    private String wordString;
    private Object answer;
    public String tokenValue;
    public String abc;
    public String id, name;
    JTextArea myTextArea;

    public String str1;
    private JFrame frame;
    public Login() {
        JFrame frame = new JFrame("Login");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();
        panel.setLayout(null);
        JLabel banner = new JLabel("Login");
        banner.setFont(new Font("SansSerif", Font.BOLD, 28));
        banner.setBackground(Color.lightGray);
        banner.setForeground(Color.WHITE);
        banner.setOpaque(true);
        banner.setPreferredSize(new Dimension(100, 1000));
        JLabel label4 = new JLabel("Enter your user name and Password");
        label4.setFont(new Font("SansSerif", Font.BOLD, 14));
        JLabel label1 = new JLabel("Name");
        label1.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JTextField field1 = new JTextField(20);
        JLabel label2 = new JLabel("Password");
        label2.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JPasswordField field2 = new JPasswordField(20);
        JCheckBox chk = new JCheckBox("Remember Password");
        chk.setFont(new Font("SansSerif", Font.PLAIN, 12));
        JButton button1 = new JButton("OK");
        JButton button2 = new JButton("Cancel");
        banner.setBounds(10, 10, 440, 35);
        label4.setBounds(20, 50, 400, 50);
        label1.setBounds(60, 90, 100, 50);
        field1.setBounds(140, 100, 200, 25);
        label2.setBounds(60, 130, 120, 50);
        field2.setBounds(140, 150, 200, 25);
        chk.setBounds(50, 180, 300, 50);
        button1.setBounds(230, 230, 100, 25);
        button2.setBounds(350, 230, 100, 25);
        panel.add(banner);
        panel.add(label4);
        panel.add(label1);
        panel.add(label2);
        panel.add(field1);
        panel.add(field2);
        panel.add(chk);
        panel.add(button1);
        panel.add(button2);
        frame.add(panel);
        frame.setSize(470, 300);
        frame.setVisible(true);
        frame.setResizable(false);
        button1.addActionListener(this);

    }

    public void actionPerformed(ActionEvent ae) {

        String data = "username & Password ";
        String line = "";

        try {
            // Send the request
            URL url = new URL(
                    "http://dakota-msiley.cwru.edu/remote/login/superman4@example.com/swordfish");
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            OutputStreamWriter writer = new OutputStreamWriter(conn.
                    getOutputStream());
            // Get the response
            StringBuffer answer = new StringBuffer();
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                answer.append(line);
            }

            writer.close();
            reader.close();
            //Output the response
            System.out.println(answer.toString());
            String str = answer.toString();
            tokenValue = str.substring(str.indexOf("<token>") + 7,
                                       str.indexOf("</token>"));
            sendPostRequest();

        } catch (MalformedURLException ex) {

        } catch (IOException ex) {

        }

    }

    public void sendPostRequest() {
        String data = "username & Password ";
        String line = "";
        try {
            // Send the request
            URL url = new URL(
                    "http://dakota-msiley.cwru.edu/remote/workspaces/" +
                    tokenValue);
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            StringBuffer answer = new StringBuffer();
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                answer.append(line);
            }

            //Output the response
            System.out.println(answer.toString());
            setVisible(false);
            JPanel myPanel = new JPanel();
            JTextArea tArea = new JTextArea(5, 5);
            myPanel.add(tArea);
            JDialog dialog = new JDialog(this, "Upload", true);
            dialog.add(myPanel);
            tArea.setText(answer.toString());
           dialog.pack();
            dialog.setVisible(true);

        } catch (MalformedURLException ex) {
            ex.printStackTrace();
        } catch (IOException ex)

        {
            ex.printStackTrace();
        }

    }


    public static void main(String[] args) {
        Login login = new Login();
    }
}



Please do help me!!!!!
Was This Post Helpful? 0
  • +
  • -

#14 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 292
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Re: Displaying the output on the frame instead of a console

Posted 24 May 2011 - 10:02 AM

what are you trying to output? We aren't familiar with your project so it needs to be explained in detail to us. Can you give us an example of what it should look like when completed?
Was This Post Helpful? 0
  • +
  • -

#15 swethareddy12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-May 11

Re: Displaying the output on the frame instead of a console

Posted 24 May 2011 - 10:06 AM

View PostLuckless, on 24 May 2011 - 10:02 AM, said:

what are you trying to output? We aren't familiar with your project so it needs to be explained in detail to us. Can you give us an example of what it should look like when completed?


Hey LuckLess :

First I have a login : I get the token and I get the information what is below on the GUI TextArea. But I need to get it as a Tree Structure
workspaces
workspace
id : 1
name:
workspaces
.
.
.
.
.

like this.

<?xml version="1.0" encoding="UTF-8" ?><workspaces> <workspace> <id>1</id> <name>Mike Siley</name> <workspaces> <workspace> <id>16</id> <name>Child WS</name> <workspaces> <workspace> <id>17</id> <name>Child 1</name> <workspaces> <workspace> <id>18</id> <name>Child 2</name> </workspace> </workspaces> </workspace> </workspaces> </workspace> </workspaces> </workspace> <workspace> <id>9</id> <name>Test me 35</name> <workspaces> <workspace> <id>34</id> <name>Daughter</name> <workspaces> <workspace> <id>41</id> <name>Another Child</name> </workspace> </workspaces> </workspace> <workspace> <id>52</id> <name>Test Child</name> </workspace> </workspaces> </workspace> <workspace> <id>11</id> <name>Test me 35</name> </workspace> <workspace> <id>13</id> <name>WS 84</name> </workspace> <workspace> <id>14</id> <name>WS 87</name> </workspace> <workspace> <id>15</id> <name>WS 8383</name> </workspace> <workspace> <id>39</id> <name>Test WS 101</name> </workspace> <workspace> <id>53</id> <name>KCC_TEST_11JAN2011</name> <workspaces> <workspace> <id>54</id> <name>ASCHNELL</name> <workspaces> <workspace> <id>55</id> <name>kccws</name> </workspace> </workspaces> </workspace> </workspaces> </workspace></workspaces>
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2