Jump to content
  • Advertisement

Archived

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

Tac-Tics

Java Applet Problems

This topic is 5991 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!