• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying Text Vertically

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic