Two Laptop Bag*
The moose likes Swing / AWT / SWT and the fly likes New cell content in JTable is not detected. 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 "New cell content in JTable is not detected." Watch "New cell content in JTable is not detected." New topic
Author

New cell content in JTable is not detected.

SoonAnn Lim
Ranch Hand

Joined: Jun 21, 2001
Posts: 155
Hi,
I have a very weird situation that only when i edit the second cell in the table, the data in
the first edited cell will be detected. I implement my own table model with all the necessary methods including setValueAt and getValueAt.
I set the default values for all cells as empty string. My table is attached to an ActionListener object. If i pick one cell at random and type in something, and press the button, my listener object will iterate through all the cells and grab the contents. If i edit one cell, action listener reports not cell is edited(all cells contain empty string). If i edit another cell, listener will see the edit in the first cell but not the second cell. If i edit a third cell, listener will see the edit in the first and second cell but not the third cell. So on and so forth. I have not clue why this can happen. Can some one help me?
Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: New cell content in JTable is not detected.
 
Similar Threads
SWT tableitem, image not displaying properly.
Trouble with model for calculating and adding table values dependent on multiple rows
Tokenizing with regex pattern. Little confused!
Table and cell editor
JTable listening for selected rows and columns by a keypress event