Win a copy of AWS Security this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

refreshing the data in table after the booking has been done

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , there..
can anyone tell me how can i update the data that is shown in the table, after i have booked the tickets for the user.
that is, how do i show him the decremented available tickets column
[ April 03, 2002: Message edited by: Siddharth Mehrotra ]
 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Siddharth:
The following piece of code sets the Object vlaue at indicated row and col. You can use this code in your TableMODEL.

By the way, it is not a MUST requirement. I tried to update table dynamically but had a problem in table refreshing. I did not use it at all. Need more testing on this when done.
Good luck -Bal
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bal,
well what i did to get that functunality. is that
in my tableModel class i defined a method that take the new data as argument and i set that data in the Tablemodel datastructure. Now as the data of tablemodel has changed. i fired the fireTableChanged method on it, and it updayed my JTable.
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic