Archived

This topic is now archived and is closed to further replies.

netwiz

Java HELP!!

Recommended Posts

netwiz    122
/* * 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~

Share this post


Link to post
Share on other sites
WayfarerX    130
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
------------------------------

Share this post


Link to post
Share on other sites
strtok    191
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.

Share this post


Link to post
Share on other sites