Java HELP!!

Started by
4 comments, last by netwiz 22 years, 3 months ago
/* * Applet.java * * Created on January 11, 2002, 8:37 PM */ /** * * @author netkid * @version */ import java.awt.Graphics; import java.awt.Font; public class Applet extends java.applet.Applet { Font f = new Font("TimesRoman",Font.BOLD,36); public void paint(Graphics g) { g.sendFont(f); g.drawString("Hello World!", 100 , 25); } } This code doesn''t work the 2 imports are from a basic hello world. What should I do so it imports?? I''m using SUN Forte. How do I start a new applet in the same project??? The other HelloWorld ran successfully! God the IDE is confusing!! As you can see I''m new!! Thanx for any help!! ~Linux Rocks~
Don't ask me for help!
Advertisement
I don''t think Graphics has a method called "sendFont". You might want to try "setFont".
1) It''s g.setFont, not sendFont.
2) When you''re asking questions like this, post the error message you get also. Helps us know what you''re doing wrong .

"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
I don''t like ANY of the current Java IDEs.
Although Java isn''t my preferred language, I use it at my job, and I must say that Forte is an outstanding IDE. It''s got a tough learning curve, especially for people that aren''t familiar with UNIX (the concept of "mounting" a filesystem is new to some people). Once you know your way around, however, it can help you do all kinds of cool things (built in CVS support, database editing, etc.). The one thing that I dislike about it is the fact that it''s written in Java, so it''s a bit slow unless you have a top-of-the line machine. Also, because it''s a Java app, it''s a memory hog...Windows usually reports the memory usage by the Forte process at 70 MB.
I don''t like Forte. I''m supposed to be getting something else.

thanx for the help
Don't ask me for help!

This topic is closed to new replies.

Advertisement