Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validating data in JTable Cell

 
Apan Raj
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want the user to enter only integer values in a column of a JTable. If the user enters any other value, I should show error message and have the focus on the particular cell itself.
Any Idea how to implement this ?
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
From the Java Tutorial:
Using an editor to validate user entered text
From the API:
swing.JOptionPane
swing.InputVerifier
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic