java help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • help

    java help

    the code i have done retreives teh text from a file and displays it in the
    system.out.prin tln, just wondering if anyone could help me change it so that
    it displays with a java gui interface, say in a JFrame or JTextArea??

    Open.addActionL istener(new ActionListener( )
    {
    public void actionPerformed (ActionEvent e)
    {

    try
    {
    FileReader file = new FileReader("IP Information.txt ");
    BufferedReader buffer = new BufferedReader( file);


    String textline = null;
    while((textline = buffer.readLine ()) !=null)
    System.out.prin tln(textline);
    buffer.close();
    }

    catch ( IOException f ) { System.out.prin tln(f); }

    }
    });


Working...