Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Swing / AWT / SWT and the fly likes validating data in JTable Cell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "validating data in JTable Cell" Watch "validating data in JTable Cell" New topic

validating data in JTable Cell

Apan Raj

Joined: Sep 04, 2003
Posts: 20
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 ?

"If everything is in your way, sure you are on the wrong lane"
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
From the Java Tutorial:
Using an editor to validate user entered text
From the API:

SCJP2. Please Indent your code using UBB Code
jQuery in Action, 2nd edition
subject: validating data in JTable Cell