wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JTable doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable doubt" Watch "JTable doubt" New topic
Author

JTable doubt

tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
how to rotate JLabel text in JTable header ???
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10424
    
    8

Originally posted by tadi raja:
how to rotate JLabel text in JTable header ???


Just like JTable, you can set a renderer to the JTableHeader.
You will have to create a custom component for the renderer whose paintComponent will handle the rotation part.
Take a look at Graphics2D#translate and Graphics2D#rotate methods.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTable doubt