This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "display text diagonally" Watch "display text diagonally" New topic
Author

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
Bartender

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 :



-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
Consider Paul's rocket mass heater.
 
subject: display text diagonally
 
Similar Threads
JLabel
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