Archived

This topic is now archived and is closed to further replies.

Tac-Tics

Java Applet Problems

Recommended Posts

I''m trying to convert an application of mine into a Java applet, but I''m having a few difficulties. When I first load the class file, it works fine. However, when I close the browser and reopen it, it acts weird (the game restarts and it doesn''t respond to my keyboard input). I want to know how I can make it so whenever I close my browser (or reload the page), it completely restarts the game. Can anyone help me out? "I''''m not evil... I just use the power of good in evil ways."

Share this post


Link to post
Share on other sites
sorry, i can''t help you (directly)... but maybe you should try the java forum (several lines below this "beginners" forum)...

Share this post


Link to post
Share on other sites
you should implement/override start() and stop() if you haven''t already

  
public void start() {
if (t == null)
t = new Thread(this);
t.start();
}

public void stop() {
t = null;
}


where t is a Thread.

Share this post


Link to post
Share on other sites
I know about the Java forum, but this is still a beginer question (albiet a Java beginer question).

I tried overwriting the start, init, and stop methods in a number of ways, but it never seems to work =-( I''ll mess with it some more tho.

"I''''m not evil... I just use the power of good in evil ways."

Share this post


Link to post
Share on other sites