*
The moose likes Swing / AWT / SWT and the fly likes JTable Cell Editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Cell Editor " Watch "JTable Cell Editor " New topic
Author

JTable Cell Editor

harii haran
Greenhorn

Joined: Jan 18, 2004
Posts: 11
Hi All,
I have a JTable where user can enter their address information. Table has street, zip, city, county and state as Columns. (I save these info to AddressTable)
Once user enters the zipcode I have to populate the city , state and county information from the database. (from ZipcodeTable)
So far I have a ZipEditor for the zip column, which validates if the user is entering correct zipcode.
My problem is once the zip editor is done the validation, how should I get the city, state and county from ZipCodeTable and display it on the JTable.
Right now once the validation is done, the cursor moves to the city column. Where should I capture the action that zip column is ready and refresh the current table with new city state and county info.
(I hope I explained it well)
Thanks
Casen Densmore
Greenhorn

Joined: Jan 22, 2004
Posts: 14
I am guessing you have an action attached to validate the zip code? Why don't you add to that action?

If zipcode is valid, then pull stuff out of database and put into approriate fields.
I may be misunderstanding what you are trying to ask...

-Casen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable Cell Editor
 
Similar Threads
Problems with JTable. Need help!!
JComboBox in JTable
JRadioButton in JTable
jtable
JTable