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 JTable doubt 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 "JTable doubt" Watch "JTable doubt" New topic

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: 10747

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
jQuery in Action, 3rd edition