The Artima Developer Community
Sponsored Link

Java Answers Forum
Java Applet

1 reply on 1 page. Most recent reply: Jun 23, 2003 4:28 PM by Deepak

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
ben

Posts: 2
Nickname: boa
Registered: Jun, 2003

Java Applet Posted: Jun 11, 2003 12:12 PM
Reply to this message Reply
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

Why isn't this working?


Deepak

Posts: 3
Nickname: deeps
Registered: Jun, 2003

Re: Java Applet Posted: Jun 23, 2003 4:28 PM
Reply to this message Reply
Dear you need to specify the security permission, without that it won't work. If you need the steps, though they are hectic, still if you need, plz let me inform

Flat View: This topic has 1 reply on 1 page
Topic: .class to .exe Previous Topic   Next Topic Topic: Xerces: Node Attributes automatically sorted. I need un-ordered how?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use