Hey
This should help u...
import java.applet.*;
import java.awt.*;
import java.io.*;
import java.awt.event.*;
public class Apptest extends Applet implements ActionListener
{
FileInputStream fin=null;
Button b;
TextArea ta=null;
public void init()
{
ta=new TextArea(40,40);
b=new Button("click");
add(ta);
add(b);
b.addActionListener(this);
try{
fin=new FileInputStream("c:/sam.dat");
}catch(IOException e){ showStatus(e.getMessage());}
}
public void actionPerformed(ActionEvent ae)
{
try{
byte b[]=new byte[fin.available()];
fin.read(b);
ta.setText(new String(b));
}catch(IOException e){ showStatus(e.getMessage()); }
}
}
T.V.Kiran
Associate
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets