The Artima Developer Community
Sponsored Link

Java Answers Forum
My First Applet Help

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gil

Posts: 1
Nickname: gilman824
Registered: Jul, 2003

My First Applet Help Posted: Jul 7, 2003 11:04 AM
Reply to this message Reply
Advertisement
I tried writing my first Java Applet a few days ago but for some reason I am getting the error message "load: class HelloWorld not found" when I try to run the HTML document. The HTML file is in the same directory as the HelloWorld.class file. For the HTML document the source is:

<html>
<head>
<title>Hello World</title>
</head>

<body>
<applet code="HelloWorld.class" width=400 height=50>
</applet>
</body>
</html>

and for the java file the source is:

public class HelloWorld extends java.applet.Applet {

public void paint (java.awt.Graphics g) {
g.drawString("Hello, world!", 100, 25);
}

}

does anyone know why it isn't working?

Topic: How can I allow a user (client) to choose a local image file (on his hard d Previous Topic   Next Topic Topic: DEPRECATION

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use