Results 1 to 3 of 3
Thread: Applet runnable and sleep
- 04-25-2012, 04:49 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 6
- Rep Power
- 0
Applet runnable and sleep
This is a beginner question,
If i have an applet that is runnable, then how it is right to sleep it.
if i have
Thread t = new Thread ( this );
t.start();
on my applet code,
then is it ok to call like
t.sleep(1000);
or should or can i call also
Thread.sleep(1000);
are both just right.
---
Extra question, if i have an class on my applet, then is it ok to call
Thread.sleep(1000);
on this class to sleep applet thread.
Are these working on every computer, all seem to work on mine.Last edited by jaho; 04-25-2012 at 04:51 PM.
- 04-25-2012, 05:46 PM #2
Re: Applet runnable and sleep
Since sleep() is a static method, calling it with the class name would read better/be less confusing.
If you don't understand my response, don't ignore it, ask a question.
- 04-25-2012, 09:15 PM #3
Re: Applet runnable and sleep
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Trying to make runnable jars
By mwr1976 in forum New To JavaReplies: 18Last Post: 04-16-2012, 02:24 PM -
debug runnable jar
By Levian in forum New To JavaReplies: 0Last Post: 08-11-2011, 05:38 AM -
Running runnable jar AS
By sashaxiv in forum EclipseReplies: 0Last Post: 03-16-2011, 12:14 PM -
Can not make a runnable jar of my project
By liran in forum Advanced JavaReplies: 5Last Post: 05-18-2010, 11:25 AM -
Thread RUNNABLE or WAITING
By Pushkar in forum Threads and SynchronizationReplies: 10Last Post: 01-14-2010, 01:36 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks