Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

dynamic update of JTable

 
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 ?
 
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 . . .
 
Rancher
Posts: 3191
29
  • 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!
 
crispy bacon. crispy tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic