• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic update of JTable

 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so many searches in google about this topic . .
some examples are more far than my requirement.
but i cant conclude how to update my table's data . . .
please help . . .

every time i am creating a new model and setting to the table, and that is not updated in the view.
in some example revalidation() is used to update the gui . . . its not working for me.
and somone suggested me to update gui in separate thread, i have updated the scrollpane and table in separate thread . . . no use.
what to do to get updated result in table.


and again i have one more question in general . . . in my swing practice, validate(), invalidate(), revalidate() methods are not updating the gui.

am i thing in a wrong way when updating the gui ?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sanjeev charla wrote:so many searches in google about this topic . .
some examples are more far than my requirement.
but i cant conclude how to update my table's data . . .
please help . . .

There's only one place you really need to look, and that's the Sun Swing tutorial. It shows you how to do this and gives decent code examples.


every time i am creating a new model and setting to the table, and that is not updated in the view.

Then you're doing something wrong, since that should do it. I suggest you create a small compilable program that demonstrates that these steps don't work for you.


in some example revalidation() is used to update the gui . . . its not working for me.

Not needed to update a JTable.


and somone suggested me to update gui in separate thread, i have updated the scrollpane and table in separate thread . . . no use.

Without code, we have no idea where your error is.


and again i have one more question in general . . . in my swing practice, validate(), invalidate(), revalidate() methods are not updating the gui.

am i thing in a wrong way when updating the gui ?

Without seeing your code and knowing where your errors are, I don't know.
 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply . . .
the first resource to me is the sun's tutorial always . . .
but this time , i cant conclude how to code to update table in application from that tutorial.
please suggest me an example if possible.
(each and every time a new data is displayed in the table. this is the only requirement.) thanks . . .
 
Rob Camick
Ranch Hand
Posts: 2599
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
every time i am creating a new model and setting to the table,


Then it should work.

You've been asked to post your SSCCE. We can't help you otherwise!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic