File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 4658
    
    5

To get better help sooner, post a SSCCE.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: idea on how to sort a jtable header with 2 labels