This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display text diagonally

 
Dalibor Toth
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for a way to display text diagonally like in MS Excel when creating graphs, the application sets dates diagonally on the x axis if there are too many of them.
Can anybody help?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to look into the Java 2D Graphics API, it lets you perform transforms on text really well... otherwise you can only do this in a really primitive way, like this :



-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic