sythem
07-30-2007, 02:08 PM
Hello everyone,
Here's my problem, I put a loop in my applet and the applet just sits at the loading applet screen. Nothing happens, I take out the Menu();, and it works fine. With the exception of course that Menu function won't repeat. Any ideas?public void Menu()
{
buffer.setColor(Color.green);
buffer.drawString("Double-buffered",20,20);
repaint();
try { Thread.sleep(20);} catch (InterruptedException e) {}
Menu();
}
I also tried public void Menu()
{
while(stillon == 1)
{
buffer.setColor(Color.green);
buffer.drawString("Double-buffered",20,20);
repaint();
try { Thread.sleep(20);} catch (InterruptedException e) {}
}
}
But this makes no difference. I'm so confused and a little annoyed.
Here's my problem, I put a loop in my applet and the applet just sits at the loading applet screen. Nothing happens, I take out the Menu();, and it works fine. With the exception of course that Menu function won't repeat. Any ideas?public void Menu()
{
buffer.setColor(Color.green);
buffer.drawString("Double-buffered",20,20);
repaint();
try { Thread.sleep(20);} catch (InterruptedException e) {}
Menu();
}
I also tried public void Menu()
{
while(stillon == 1)
{
buffer.setColor(Color.green);
buffer.drawString("Double-buffered",20,20);
repaint();
try { Thread.sleep(20);} catch (InterruptedException e) {}
}
}
But this makes no difference. I'm so confused and a little annoyed.