This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Displaying Text Vertically Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Displaying Text Vertically" Watch "Displaying Text Vertically" New topic
Author

Displaying Text Vertically

Raghuveer Rawat
Ranch Hand

Joined: Apr 03, 2003
Posts: 102
hi all
In my application, In each JFrame I have set BorderLayout Manager.
In the West of these BorderLayout I want to set Company Name in Vertical Text. Can anyone tell me how I can do it.


Raghuveer Rawat<br />SCJP2
Dorothy Finkel-Laverty
Ranch Hand

Joined: Nov 24, 2001
Posts: 51
Just did this today with my class - you can set it up as a label, with the html tags : like this - -
JLabel right = new JLabel("<html>This <br>is<br> the<br> East<br> panel</html>");
Or any other HTML tags that make sense.
Frank Slade
Greenhorn

Joined: Jul 07, 2003
Posts: 1
You can use the method as suggested in the reply posted earlier or you can create a UI class that can be used to draw text vertically.
subclass BasicLabelUI and write your text vertically over there. Each Letter at a time.
Like this.
C
I
S
C
O
public void paint(Graphics g, JComponent c) {
//do your text writing here
}
This solution works for Swing JLabel etc,
you can over ride the paint method for your AWT component.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying Text Vertically
 
Similar Threads
BorderLayout...
Resizable swing elements
TextArea wrapping
Help suggest a proper layout manager for my form
ComboBox