ben
Posts: 2
Nickname: boa
Registered: Jun, 2003
|
|
HELP: Simple Applet
|
Posted: Jun 12, 2003 7:23 AM
|
|
Advertisement
|
I've written an applet that accesses a file, but the write process isn't working.
This is the code that writes to the file:
try { file = NAME + ".txt";
FileWriter FileWrit = new FileWriter (file);
BufferedWriter BuffWrit = new BufferedWriter (FileWrit);
PrintWriter PrinWrit = new PrintWriter (BuffWrit);
PrinWrit.print (HIGH + " "); PrinWrit.print (TOTAL + " "); PrinWrit.print (GAMES);
PrinWrit.close(); }
Catch (IOException exception) { Title.setText (exception + ""); }
"file" is an empty String variable "NAME" is a String variable holding the player's username "HIGH", "TOTAL", and "GAMES" are all integer variables.
You can get the whole source code at http://www.geocities.com/benoaustin/Game.java
Can someone tell me what I've done wrong?
|
|