• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Related JTable Header

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Code

 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nested sub-header[b/]





[b]Code






 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Continue .....




 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can download and more example at

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


This will help you ...
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gurunath Kale
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
A "dutch baby" is not a baby. But this tiny ad is baby sized:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic