Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Drawing Vertical Strings in a Java Applet

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am writing a java applet that displays a line graph, and I am wondering if it is possible to draw vertical strings in the applet. the drawString method only allows you to give it a startX and a startY, which means that the only way to draw that string is horizontal.
If you know how to do this, I would appreciate any information you could provide.
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a loop control, you can use charAt(String toDraw) to draw each character of the string with a constant X-coordinate and decreamental Y-coordinate.
You need to experiment to find correct X-coordinate and correct y-coordinate and its decreamental according to the font you are using for the string.
Hope this helps.
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic