Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2008

Tip: Looking for answers? Try searching our database.

is there any way i can set a time limit for user input in a java     program?

Thread view: 
Avi - 11 Apr 2008 16:54 GMT
I m taking some input from the user in a java program. and i wanna set
a time limit within which the user should provide this input. if no
input is provided during this time interval, the program sets the user
input to a space (ASCII code 32). other wise the user input is set to
whatever is entered by the user and the program moves on with
execution of the rest of the program.
Any help will b appreciated.
RedGrittyBrick - 11 Apr 2008 17:08 GMT
> I m taking some input from the user in a java program. and i wanna set
> a time limit within which the user should provide this input. if no
[quoted text clipped - 3 lines]
> execution of the rest of the program.
> Any help will b appreciated.

Perhaps a solution would involve the use of java.util.Timer but it
probably depends on what classes you are using to get the input.

Signature

RGB

RedGrittyBrick - 11 Apr 2008 19:23 GMT
>> I m taking some input from the user in a java program. and i wanna set
>> a time limit within which the user should provide this input. if no
[quoted text clipped - 6 lines]
> Perhaps a solution would involve the use of java.util.Timer but it
> probably depends on what classes you are using to get the input.

I couldn't resist

http://redgrittybrick.livejournal.com/2008/04/11/

Signature

RGB

Arne Vajhøj - 12 Apr 2008 00:32 GMT
> I m taking some input from the user in a java program. and i wanna set
> a time limit within which the user should provide this input. if no
[quoted text clipped - 3 lines]
> execution of the rest of the program.
> Any help will b appreciated.

Console or Swing app ?

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.