Creating a table with my own data, how to use JTable Constructors? :(
ola!
I am trying to create a table with my data and with predefined column names.
I already searched and saw JTable's Constructor:
JTable(Object[][] rowData, Object[] columnNames) .
Now, it would be perfect if instead of the array rowData which is of Object type I could put my own array, I have this:
Data[] IPdata= new Data[50];
IPdata = new Data();
where Data class looks like this:
public class Data {
public String srcIP, srcPort, destIP,destPort, protocol;
int size;
public Data() {
this.srcIP=srcIP;
this.srcPort=srcPort;
this.destIP=destIP;
this.destPort=destPort;
this.protocol=protocol;
this.size=size;
}
}
any ideas how I can go around this? :P
thank you for your time!
Cris

