Good, I have a problem if I want for example that each column of a table can store a different type of object, for example in the first column a string and in the second a double,
How can I do it?
Thanks in advance.
Good, I have a problem if I want for example that each column of a table can store a different type of object, for example in the first column a string and in the second a double,
How can I do it?
Thanks in advance.
I do not understand the question, the DefaultTableModel that you can use to build your table with the values you want. For example
Object data[][] = {{"Hola", new Double(1.1)}, {"Otra fila", new Double(2.2)}};
Object[] colsNames = {"String", "Double"};
DefaultTableModel model = new DefaultTableModel(data, colsNames);
JTable table = new JTable(model);