Archived

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

java applets on MS IE?

This topic is 5510 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I cannot get this code... import java.applet.*; import java.awt.*; /* * The HelloWorld class implements an applet that * simply displays "Hello World!". */ public class world extends Applet { public void paint(Graphics g) { g.drawString("Hello world!", 50, 25); // Display "Hello world!" } } to do anything in Microsoft Internet Explorer...the html file has the line as... "" so the grey box shows up but the text doesn''t....what am I doing wrong?

Share this post


Link to post
Share on other sites
You should really post this problem in the Java forum. Without seeing all of your html and code its hard to determine your problem. It may be you are trying to close the applet block with /code instead of /applet.

Share this post


Link to post
Share on other sites
oops...i didn''t know this was the game programming forum..thought i was posting in the general programming forum...and i didn''t know there was a java programming forum. I re-posted in java forum...thanks =]

Share this post


Link to post
Share on other sites
oops...i didn''t know this was the game programming forum..thought i was posting in the general programming forum...and i didn''t know there was a java programming forum. I re-posted in java forum...thanks =]

Share this post


Link to post
Share on other sites
Dude, basically what you''re trying to do, is to printout some text using the background color.....doh:D
Try this instead
g.setColor(Color.red);
g.drawString("bla bla",50,50);
and voila, you''re all set

Share this post


Link to post
Share on other sites