• 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

Get String from an area drawn using Graphics.drawString(str, x, y)

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I trying to create an automation framework for a Applet Based Java Application. Now, from the screen I need to get the String drawn using Graphics.drawString(String str, int x, int y).

I can get the x & y coordinates, is there a way by which I can get the string drawn by the above method call on screen?

Thaks In Advance,
Vinayak
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep a copy of "str" along with the x and y of where you placed it. Once you draw the string with Graphics, it's just colored pixels, not text.

Hope that helps.
reply
    Bookmark Topic Watch Topic
  • New Topic