GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Small applet text problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Small applet text problem" Watch "Small applet text problem" New topic
Author

Small applet text problem

Jon Brasted
Greenhorn

Joined: Mar 18, 2004
Posts: 19
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

Joined: Mar 18, 2004
Posts: 19
Silly me! I needed to change "SetColor" to "setColor" -- what a noob! :roll:
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Small applet text problem