maramiro wrote:
can anyone help me,i have a TextArea and a file.txt,and i want to
display this file on the text area?what method can i use to do this??
textFileReader = new FileInputStream( filepath );
StringBuffer text = new StringBuffer();
byte[] buffer = new byte[bufferLength];
try {
while ( ( bytesRead
= textFileReader.read( buffer, 0, bufferLength ) ) != -1 )
text.append( new String( buffer, 0, bytesRead ) );
} finally {
textFileReader.close();
}
TextArea manualTextArea = new TextArea( text.toString(), 20,
50, TextArea.SCROLLBARS_VERTICAL_ONLY );
Edwin Martin
--
http://www.bitstorm.org/edwin/en/