Thanks for the reply tom.
For the first issue i have found the solution to hide a particu;ar column
I have decided to use the TableColumn api which has a setMaxwidth() method which will allow me to set the column width to zero.
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/table/TableColumn.htm Regarding the second issue at hand im not sure if it will work in my case. I figure i best use an ArrayList type in a TableModel class to store data to be displayed in the JTable.
Data in my Hashmap which i use a cache to store records from the database looks like this:
key object
74 Booking
140 Booking
The key value above points to the location on file where the record is stored and the booking contains the releavnt database fields.
So i need to have the key as part of the data which i display in the Jtable so that when the user clicks the button on the UI to remove the record after selecting it the underlying record key is assocaited with the row object so that i can then use this key value to remove this record from the hashmap and db file.
I wonder if changing my design not to use a hashmap and instead use an arraylist to store records in my cache whereby the Booking object will contain a field to store the key or pointer to the record on file??
David