Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-21-2007, 09:46 AM
Member
 
Join Date: Jul 2007
Posts: 4
bilal_ali_java is on a distinguished road
how to take input and verify input in Java programs
Respected Members,
I have 3 questions with slight changes, I would be thankful to you if you can help me solve this problem, I consulted some books and web sites but did not found the solution, the questions are as follows:

1) I want to make a Java console program which when executed will ask the user to enter some input from the key board on the command prompt,now suppose if the user enters Ctrl-F3 than a message would be printed that "you have entered the correct input", but if the user enters any other key or a combination of various key a message will be printed "you did not entered the correct key". Now my question is that how will I take input and after that on what basis will I cehck that a combination of paticular keys(Ctrl-F3) is pressed, I mean that what will be the basis of the IF ceck and what is the thing which I am going to check? If any one cal mail some sample code for this program I would really be thankful, or if you can give some oter important resources?

2) Now my second question is just an extension fo the first question with some slight variations.The thing which I was doing in previous question on a console based program I will now have to do it in GUI based program, I mean that now when I run my program a form(frame a JFrame or Frame) it will ask the user to enter some input from the key baord again if the user presses Ctrl-F3 than a message will be displayed taht you have entered correct input for any other key or key combinations tahnsome other message will be displayed, now here also my question is the same tat how will I take input,than how will I check this input and on what basis will I identify Ctrl-F3 key press.

3) The third question is same as the first two questions,but here my Java program is running like a Windows process I mean that when ever I start my computer this program starts nning at the back end in Windows(Win XP OS),and the program is continiously tracking all the key presses by the users if some user enters Ctrl-F3 a message will be displayed and if the user enters any other key or combination of keys than nothing will happen,how can I achive this and again I am asking that on what basis will I check the suer input,what will be the IF check,and how can I take input.

Please all reply soon because I consulted some books and web sites but did not found the solution,please guide me,I would be thankful to all of you people.

Thanking You,
Bilal Ali.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
skipping input windie_86 New To Java 1 02-12-2008 08:09 PM
input placed in array smilejava New To Java 5 11-12-2007 08:29 AM
input placed in array smilejava New To Java 1 11-05-2007 01:32 PM
java.lang.NumberFormatException: For input stream:jav osval New To Java 2 08-07-2007 04:50 PM
Help with program input Daniel New To Java 1 07-05-2007 06:02 AM


All times are GMT +3. The time now is 02:44 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org