This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes display text diagonally Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "display text diagonally" Watch "display text diagonally" New topic

display text diagonally

Dalibor Toth
Ranch Hand

Joined: Jul 16, 2001
Posts: 38
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

Joined: Oct 18, 2000
Posts: 4121

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 :


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
subject: display text diagonally
Similar Threads
Best Swing Component For Icons
JButton doesn't display "+" or "-"
Value passed from java to textbox is incomplete
Problem in setting a value of drop down