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 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 Android Security Essentials Live Lessons this week in the Android 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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: validating data in JTable Cell
Similar Threads
Disable Selection in a JTable
No editting to the JTable
JTable Cell