aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Related JTable Header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Related JTable Header" Watch "Related JTable Header" New topic
Author

Related JTable Header

Arun thoppegowda shivanna
Greenhorn

Joined: Aug 16, 2004
Posts: 6
I want to have multiple Line Header something like this is it possible


----------------------------------------
| INPUT VALUES |
---------------------------------------- TABLE Header
| X | Y | Z | NO |
-----------------------------------------
[ August 25, 2004: Message edited by: Arun thoppegowda shivanna ]
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312



Code



SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Nested sub-header[b/]





[b]Code






somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Continue .....




somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
You can download and more example at

http://www.codeguru.com/java/Swing/JTable/Header/index.shtml


This will help you ...
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Gurunath Kale
Greenhorn

Joined: Jul 08, 2007
Posts: 14
Hi all,
The above mentioned code is pretty old one (1998), and seems to be not working as expected.
When I googled for multispan header, I found same code on various sites.

http://www.crionics.com/products/opensource/faq/swing_ex/JTableExamples1.html

The Multispan header doesn't get rendered as expected but looks as normal header.
Can anybody help me in Multispan header.


░▒▒▓ ĞŨЯŨ ▓▒▒░
Back To Make Things Better
SCJP
Gurunath Kale
Greenhorn

Joined: Jul 08, 2007
Posts: 14
Hi All
I got the solution, few changes in GroupableTableHeader.java
Just remove setUI(..) call in constructor, instead override the setUI(..) method.

public void setUI(TableHeaderUI ui) {
super.setUI(new GroupableTableHeaderUI());
}

And it will work fine. Problem was, the over ridden paint method was not getting called previously, not it works.
When I did Google for this issue, almost all sites have this code. Credit must go to Nobuo Tamemasa
Thanks Nobuo Tamemasa
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Related JTable Header