• 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

Small applet text problem

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Does anyone know why this code does not work? Thanks for any help.
AppletText.java:14: cannot resolve symbol
symbol : method SetColor (java.awt.Color)
location: class java.awt.Graphics
g.SetColor(Color.blue);
^
AppletText.java:15: cannot resolve symbol
symbol : method SetFont (java.awt.Font)
location: class java.awt.Graphics
g.SetFont(new Font("Verdana", Font.BOLD, 12));
^

Thanks again,
Jon
 
Jon Brasted
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Silly me! I needed to change "SetColor" to "setColor" -- what a noob! :roll:
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Jon!
I'm glad we could help by being your Cardboard Analyst.
As a good beginner tip that helped me out a lot, if you weren't already familiar with it, let me introduce you to the J2SE API documentation. It does a great job of documenting and describing almost all of the classes (and their methods) available in the J2SE API.
It's a very nice resource for doing things like looking up what methods are available to a Graphics type object, including the names of methods, what parameters they take, what might get returned, what various methods do, etc.
Good luck and I hope to see you 'round the Ranch!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic