Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable doubt

 
tadi raja
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to rotate JLabel text in JTable header ???
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic