Solved

"Colspan" on JTable headers

Posted on 2002-04-10
3
1,546 Views
Last Modified: 2010-05-18
Hi,

Using a JTable is it possible to emulate the following with major table headers spaning over several columns?

(might help to copy to a fixed width font to see the design layout)
+---------------+---------------+---------------+
| May           | June          | July          |
+---+---+---+---+---+---+---+---+---+---+---+---+
| 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 |
+---+---+---+---+---+---+---+---+---+---+---+---+
|   |   |   |   |   | x |   |   | x |   |   | x |
+---+---+---+---+---+---+---+---+---+---+---+---+
|   | x | x | x |   |   | x |   |   | x |   |   |
+---+---+---+---+---+---+---+---+---+---+---+---+

Cheers,

Mal
0
Comment
Question by:malcx
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 6930869
0
 
LVL 3

Author Comment

by:malcx
ID: 6944221
Cheers -  a great link,
sorry for the delay
Mal
0
 
LVL 92

Expert Comment

by:objects
ID: 6944303
No worries :-)

http://www.objects.com.au
Brainbench MVP for Java 1
http://www.brainbench.com
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now