[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ajug-members]: Wait()
I am new to JAVA, so please bare with me. If you don't use
Thread.sleep(long) for displaying a wait screen, what would you recommend
doing to have a form displayed for 30 seconds then show a new window? Also,
the hide and show functions do not seem to work. I thought you could just
use splash.hide(); and fserver.show();, but that will not compile.
Any help would really be appreciated,
What I have so far:
public static void main(String args[]) {
new fserver().hide();
new splash().show();
wait 30 seconds
try {
Thread.sleep(300); // milliseconds
} catch (InterruptedException e) {}
new splash.hide();
new fserver().show();
}
Cody Wehunt
cody@wehunt.net
770-402-9189 Cell
770-226-5938 Work
My as always.
-----Original Message-----
From: Brian Lee [mailto:brian_a_lee@hotmail.com]
Sent: Monday, April 26, 2004 5:17 PM
To: ajug-members@ajug.org
Subject: RE: [ajug-members]: Wait()
You don't need to include anything since Thread is in the java.lang package.
Please note, that you really shouldn't use Thread.sleep(long) for displaying
a wait screen to a user as this would be a UI function. Usually, I've found
most of the time when you think you need a Thread.sleep() call, you really
don't (or shouldn't).
BAL
>From: "Cody Wehunt" <cody@wehunt.net>
>To: <ajug-members@ajug.org>
>Subject: RE: [ajug-members]: Wait()
>Date: Mon, 26 Apr 2004 16:58:56 -0400
>
>Do you have to setup any threads to use it, or can it be used say to
>show a splash screen for x seconds and then continue processing? Do
>you have to declare any includes?
>
>
>Thanks,
>
>
>Cody Wehunt
>cody@wehunt.net
>770-402-9189 Cell
>770-226-5938 Work
>My <http://wehuntnet.instaccount.net/images/two_cent.gif> as always.
>
>
>
> _____
>
>From: Jim Worthington [mailto:jim.worthington@worthsoft.com]
>Sent: Monday, April 26, 2004 4:41 PM
>To: ajug-members@ajug.org
>Subject: RE: [ajug-members]: Wait()
>
>
>Thread.sleep(30000L) is the equivalent. The argument is a long and the
>units are milliseconds.
>
>- Jim Worthington
>
>-----Original Message-----
>From: Cody Wehunt [mailto:cody@wehunt.net]
>Sent: Monday, April 26, 2004 4:24 PM
>To: ajug-members@ajug.org
>Subject: [ajug-members]: Wait()
>
>
>Is there a built in wait function in JAVA?
>
>i.e.
>
>wait(30); //hold processing for 30 seconds
>
>
>Thanks,
>
>
>Cody Wehunt
>cody@wehunt.net
>770-402-9189 Cell
>770-226-5938 Work
>My <http://wehuntnet.instaccount.net/images/two_cent.gif> as always.
>
>
>
_________________________________________________________________
Lose those love handles! MSN Fitness shows you two moves to slim your waist.
http://fitness.msn.com/articles/feeds/article.aspx?dept=exercise&article=et_
pv_030104_lovehandles