I want to convert my command line app to an
applet. My command line app uses plain text files to load some data that program needs. When I implement this class in an applet it can't read the file (eventhough it's in the same directory). I use this principle to load files:
try{
BufferedReader reader = new BufferedReader(new FileReader(new File("text.txt"));
String line = null;
while((line=reader.readLine()) != null){
System.out.println(line);
}
reader.close();
} catch(Exception ex) {
System.out.println("Cannot read file");
}
What do I need to change?
And are there some visual component which can display my System.out.println("")? I mainly want to make it into an applet to make distribution easier, but the output of the program can still come in some sort of text window (which one?).
[ January 07, 2007: Message edited by: Tim Pintens ]