Create sub column in JTable

I am using Jtable. I want to set coloumn heading in the format like, if table contains column 'colmn1' then i want 2 sub columns in main coloumn say 'colmn1.1' and 'column1.2'. How should i do it? I am using following code,
private javax.swing.table.DefaultTableModel tm = new javax.swing.table.DefaultTableModel(rows,coloum);
tblsearch.setModel(tm);
AuriiAsked:
Who is Participating?
 
aaverCommented:
I'm not sure I understand. Do you want one heading with name "column1" and two sub headings below, named "column1.1" and "column1.2"? In other words, do you want the heading "column1" to span two columns?
0
 
AuriiAuthor Commented:
I want one heading with name 'column1' and 2 sub headings below, named 'column1.1' and 'column1.2'
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
aaverCommented:
Ok, then the second link should be interesting: http://www.codeguru.com/java/articles/124.shtml
0
 
aaverCommented:
The links looked promising at first, but now I'm not so sure any more. I will try to find out a better way.
Sorry for any inconvenience.
0
 
AuriiAuthor Commented:
These solutions not worked. Please suggest me some useful solution.
0
 
zzynxSoftware engineerCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.