JTable: combine columns
I have a table with 4 columns; I would like to combine the 1st and 2nd column and the 3rd and 4th column to a new one:
header1header2
column1column2column3column4
I have the following code... I don't know what I have to change to create header1 and 2:
private String rowData[][] ={
{"0","-1","0","-1"}
};
private String columnNames[] ={
"M","D","m","D"
};
(...)
d_Table =new JTable(rowData, columnNames);
getContentPane().add(new JScrollPane(d_Table));
The table should just show the values I provide - this is working fine.
Thanks a lot for your help!

