• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

New cell content in JTable is not detected.

Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
I'm full of tinier men! And a tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!