String[] columnNames = {"Type", "Employee ID", "First/Last Name","DOB", "Gender", "HIre Date", "OnCall", "BaseSalary", "Commission/Hourly Rate"};
Object[][] data = new Object[10][9];
table = new JTable(data,columnNames);
public ArrayList<Person> employeeList = new ArrayList<Person>();
public ArrayList<Client> clientList = new ArrayList<Client>();
public ArrayList<Stock> stockList = new ArrayList<Stock>();
I'm trying to create a JTable with information inside a array-list. I tried something along the lines of.
data[0][0] = "Account";
data[0][1] = 1; //int
data[0][2] = "Name";
data[0][3] = dob; //Date class
data[0][4] = gender; //Enum
data[0][5] = hire //Date class
data[0][6] = true; //boolean
data[0][7] = 125.23; //double
data[0][8] = 0.015; //double
Which didn't work out really well, I try google but most of the examples have pre-made arrays so didn't help much.