my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes refreshing the data in table after the booking has been done Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "refreshing the data in table after the booking has been done" Watch "refreshing the data in table after the booking has been done" New topic
Author

refreshing the data in table after the booking has been done

Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
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 ]

SCJP, SCJD.
Bal Sharma
Ranch Hand

Joined: Sep 19, 2001
Posts: 273
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

Joined: Aug 21, 2001
Posts: 185
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: refreshing the data in table after the booking has been done
 
Similar Threads
how can i resultset data to text file in a table format
Servlet code for updating data in database
Query Question
hibernate+spring+mysql+tomcat
SOS! I have deleted a Oracle table data without backup