This is driving me crazy. I read the Sun's tutorial regarding the creation of a basic table with a default data model, but cant figure out a simple example about how to load an array of data-objects like:
class dataObject{
String name;
String gender;
Byte age;
public dataObject (String name, String gender, Byte age){
this.name = name;
.
.
}
Then i create, for example, a vector of this stuff:
Vector v = new Vector(99);
v.addElement(new dataObject("Marrie", "Female", 33);
v.addElement(new dataObject("John", "Male", 32);
With dataObject i'd gather the info, now how the heck i show it in a table? Because this is not working:
JTable newTable = new Jtable(v, header) // header is another Vector.
I'm getting some errors that lead me to this last line. So, any help, even little, is apreciated. I know there are several threads about this, but those people already have a gasp about how JTable + TableModel works, I just barely get it.
Thanks a lot.