Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User Input into a Text Field

 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic