Advertisement Jump to content
Sign in to follow this  

First Java Applet

This topic is 2660 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 have uploaded everything to . When I visit this page from my computer (Windows Vista) using both Firefox and Internet Explorer, it works just fine. But when my brother visits on his computer (Windows 7) using the same browsers, it does not work. Also, when my daughter visits from her computer (Windows XP) using both Google Chrome and Internet Explorer, it does not work for her either. What is the most likely cause of this? Thanks in advance for any help you can provide.

Here is the java code

import java.applet.*;
import java.awt.*;

public class HelloWorld extends Applet
private Font a_Font;
Image coolImage;

public void init()
a_Font = new Font("Helvetica", Font.BOLD, 48);
coolImage = getImage(getCodeBase(), "hottie.jpg");

public void paint (Graphics g)
Color adamBlue = new Color (80,124,224);
g.drawString("Hello World!", 50, 75);

Here is the html

<TITLE>Hello World Applet</TITLE>
<H1>Hello World Applet</H1>
<APPLET CODE="HelloWorld.class" WIDTH=500 HEIGHT=500>

Share this post

Link to post
Share on other sites
You need to install the Java plugin for the browser for Java applets to run. Note that this is not the same as JavaScript.

Java Runtime can be downloaded from the Oracle website.

Share this post

Link to post
Share on other sites
Modern browsers have developer consoles and tools hidden in one of their menus. You can use these to get error messages, which will help pinpoint what is going wrong.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!