• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Small applet text problem

 
Jon Brasted
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Silly me! I needed to change "SetColor" to "setColor" -- what a noob! :roll:
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • 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!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic