This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes idea on how to sort a jtable header with 2 labels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "idea on how to sort a jtable header with 2 labels" Watch "idea on how to sort a jtable header with 2 labels" New topic
Author

idea on how to sort a jtable header with 2 labels

mark goking
Ranch Hand

Joined: Aug 18, 2009
Posts: 155
hi all. i need advice on how to go about a jtable with a column header having 2 labels (i made a custom header renderer) that when clicking any of those 2 will initiate a sort

my requirement is that i do not have to put them as separate columns so 1 column with 2 labels (col1 and col2) have values in each cell represented as col1value - col2value

also, is there a quick way in the api where the arrow sort icon functionality can be embedded within those 2 label headers?

please refer to image attach to see how my header looks like

any ideas? thank you


[Thumbnail for sample.jpg]



Website/Java Games: http://www.chitgoks.com
Tech Blog: http://tech.chitgoks.com
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4998
    
    8

To get better help sooner, post a SSCCE.


luck, db
There are no new questions, but there may be new answers.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: idea on how to sort a jtable header with 2 labels
 
It's not a secret anymore!