This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to update JTable values 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 "how to update JTable values" Watch "how to update JTable values" New topic

how to update JTable values

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
Here is the problem. I have a table that is editable by direct keyboard input. After the input I will collect the table data by clicking a button. However I found I can't get the correct value of the last cell of the table, because even though I clicked on the button, last cell of the table is still get focused, thus the new value is not stored in the tableModel. I want to know is there a way that I can force the table to update the values if I click the button. Thanks in advance.
ma ti

Joined: Jul 28, 2003
Posts: 2

try to use

bye, mati
Tim Troy
Ranch Hand

Joined: Apr 02, 2003
Posts: 51
You could call a method like this.
I agree. Here's the link:
subject: how to update JTable values
Similar Threads
How to force validation?
DataTable inside a DataTable
get table values from jsp to servlet
Custom renderer/editor for table cell
JTable input not correctly input-ted when a button is pressed