Win a copy of Spring in Action (5th edition) this week in the Spring 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

updating jTable  RSS feed

 
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'v a jtable that displays database items; i'v inserts and updates too
i googled a lot but anyhow i cant manage it - how to have the table automaticaly updated
i tried several ways,like from input button action:

actually i'm using a solution that works in part, because it does refresh the jtable but conflitcs with the sorter class i'm using (from sun java tutorial):

i'm using this model:

how can i achieve this?
TiA
[ October 08, 2006: Message edited by: miguel lisboa ]
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after re-reading sun java tutorial on jTable, i added this to my code:

which is called when user pushes add button
inddeed the table refreshes, but overwrites last row
if i close and reenter my app, values are correct, but in fact this does not work
if i try adding one to the row count i get an error out of bounds...
dont knoow how to fix this
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!