Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable as User's input (?)

 
Sandip K Sadhukhan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have never used JTable before, in one application I am thinking to display a bank JTable for user input as next process the data and display result in a non-editable JTable. Now my question is it possible to do so or it is not advisable to take input from user in such way?

I have tried to make a JTable implementing TableModel with some initial cell's value as shown in Tutorials, but when I change the data I a cell and then try to get value of that cell, it gives the old value ?

Any experienced idea will be highly appreciated.

Sandip
 
Venkatraman Kandaswamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your luck - I was messing with a swing tool just today. Anyways did you do a firetablecellupdated after you set the values?? Probably thats the reason its not getting updated. Anyways here is my table model - compare with the one you are having - probably it might give you some insights.

 
Sandip K Sadhukhan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Venkat,
I am not a professional java gui developer, just started to learning swing/ stand-alone application all these I do in my odd hours.
I appreciate your suggesion and try it out and if fail , I will post the code of my TableModel class.

regd,

Sandip
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic