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!

[1141 byte] By [SFLa] at [2007-11-27 6:43:42]
# 1
http://www.crionics.com/products/opensource/faq/swing_ex/SwingExamples.html
camickra at 2007-7-12 18:14:42 > top of Java-index,Desktop,Core GUI APIs...