wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes JTable as User's input (?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable as User Watch "JTable as User New topic

JTable as User's input (?)

Sandip K Sadhukhan

Joined: May 20, 2005
Posts: 2
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.

Venkatraman Kandaswamy
Ranch Hand

Joined: Jul 07, 2004
Posts: 120
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.

--Venkatraman<br />SCJP 1.4<br /><a href="http://kvrlogs.blogspot.com" target="_blank" rel="nofollow">blog</a>
Sandip K Sadhukhan

Joined: May 20, 2005
Posts: 2
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.


I agree. Here's the link: http://aspose.com/file-tools
subject: JTable as User's input (?)
It's not a secret anymore!