Writing an Applet that takes a string and places it in the center of specified area. Utilizing drawString to position the string for the output. I want to use FontMetric to determine the size of the string in Pixels.
I have the following lines coded to display the value returned from FontMetrics processing when perfroming the drawString.
//change string to upper case letters //output string sName for second time g.drawString(sName.toUpperCase( ),lowXSpot,lowYSpot); }
When I go to compile the code, I get the following message: WriteNameApplet.java:58:cannot resolve symbol Symbol : class FontMetrics Location : class WriteNameApplet FontMetrics fm = g.getFontMetrics(); ^ 1 error
When I looked at the entries on the forum, it appears that I have this coded properly but....
I would appreciate any suggestions as to what the problem may be?
Welcome to JavaRanch! We don't have too many rules 'round here, but we do have our Naming Standards. Please Change your display name to match these standards. (Mike Louys will suffice/Even 'though the name is nice/There's no need to say it twice.)
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com