This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes User Input into a Text Field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "User Input into a Text Field" Watch "User Input into a Text Field" New topic
Author

User Input into a Text Field

Dave Donohoe
Ranch Hand

Joined: May 16, 2000
Posts: 73
How do I restrict Users to only enter digits into a Text Field ?
I want to check before the User clicks OK.........
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi Dave,
IMO u will have to use consume() method of the AWTEvent class to consume the events of any key pressed/released that u want. once consumed the keys will not be shown in the text field/area.
Regds.
Rahul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: User Input into a Text Field
 
Similar Threads
validations coding..
Drag text field on label and set label's text in textfield
SETTING FOCUS ON A TEXT FIELD
onChange question
popup form - howto get data ? from newbie