Posted By:
Michael_Wax
Posted On:
Thursday, April 5, 2001 08:57 AM
I will go out on a limb and guess that you really want to use an ArrayList. The ArrayList is like a Vector, but its methods are not synchronized (for multithreaded access), so it is much faster than a Vector. If I were creating a table, I would use an ArrayList of container objects, each of which represents a row in the table. A nice thing about an ArrayList is that you can use Collections.sort to sort the elements in any way you like.
I would use a HashMap (over the synchronized Hashtable) if my table had only two columns, or if there were one column whose values would serve as the keys for retrieving each row.