?
Solved

Create sub column in JTable

Posted on 2011-02-20
7
Medium Priority
?
1,223 Views
Last Modified: 2013-11-23
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);
0
Comment
Question by:Aurii
  • 4
  • 2
7 Comments
 
LVL 4

Expert Comment

by:aaver
ID: 34937612
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
 
LVL 4

Accepted Solution

by:
aaver earned 2000 total points
ID: 34937620
0
 

Author Comment

by:Aurii
ID: 34940029
I want one heading with name 'column1' and 2 sub headings below, named 'column1.1' and 'column1.2'
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Expert Comment

by:aaver
ID: 34940515
Ok, then the second link should be interesting: http://www.codeguru.com/java/articles/124.shtml
0
 
LVL 4

Expert Comment

by:aaver
ID: 34940686
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
 

Author Comment

by:Aurii
ID: 35108157
These solutions not worked. Please suggest me some useful solution.
0
 
LVL 37

Expert Comment

by:zzynx
ID: 35422217
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question