This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
 
Similar Threads
Why null is return?
set header and getheader
no of counts of user who had entere the website through google
in a soap header entry, if no actor attr, but has mustUnderstand attr, that means the
WA #1.....word association