I have a JTable and I'm using the DefaultTableModel. I have one row, but I'm trying to add many columns using a for loop because the table is created dynamically.
With addColumn, I understand the first argument should be a string for the column name, but how can I pass a double for the data value in the table? I have read the definitions (the use of object or vector) but I'm having no luck with them:
String colName = "ColName";
double value = 1.2;
model.addColumn(colName, new double[]{ value });