wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to create a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to create a table" Watch "How to create a table" New topic
Author

How to create a table

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192
Hi,
I want to create a table, which stores all the information.
For example if i have a class like
public class person {
public string name;
public int ssn;
public int age;
}
What i want to do is i want extract all the information from the object and store in the data structure like:
Name SSN Age
XXX YYY Z
UUU WWW q
I want this data structure to be ordered.
can some one tell me , how to do this.
Please help .
Thanks for your time
kumar.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
From your other comments, I assume that by "table" you really mean data structure, as opposed to a GUI table, like JTable.
I suggest you check out Java Collections, which has a wealth of data structures for this type of purpose.
--Mark
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to create a table