File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android 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.
I agree. Here's the link:
subject: display text diagonally
It's not a secret anymore!