strategist333
In Runtime
- Messages
- 103
Hi all
I have a major project due in three days, and I need to figure out how to terminate an applet once the browser is closed. The applet runs just fine, but because I use a while(true) loop to generate random iterations, the applet keeps on running even though I tell Internet Explorer to exit. I don't think that I can simply use a for loop, because the point of my program is to keep going until told to stop (it is a simple screensaver-like applet). My teacher will not accept projects that require a "Ctrl+alt+del">>terminate IEXPLORE.exe to exit out of the program. Is there any way (code) to remedy this problem? Thanks!!
Here's a rough outline of my code::
public class Project extends Applet
{
public void init()
{....}
public void paint(Graphics p)
{
while(true)
{
//draws objects onto a screen
}
}
//other methods, etc.
}
I have a major project due in three days, and I need to figure out how to terminate an applet once the browser is closed. The applet runs just fine, but because I use a while(true) loop to generate random iterations, the applet keeps on running even though I tell Internet Explorer to exit. I don't think that I can simply use a for loop, because the point of my program is to keep going until told to stop (it is a simple screensaver-like applet). My teacher will not accept projects that require a "Ctrl+alt+del">>terminate IEXPLORE.exe to exit out of the program. Is there any way (code) to remedy this problem? Thanks!!
Here's a rough outline of my code::
public class Project extends Applet
{
public void init()
{....}
public void paint(Graphics p)
{
while(true)
{
//draws objects onto a screen
}
}
//other methods, etc.
}