[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The simplest java script (dosen't work)

Hi all,

I'm new to Java and am trying make this rediculously simple script run.
I've tried to run it using Netscape 2.0 and the below HTML code, but all I
get is "My java Applet says:". I also tried to run it using the
Appletviewer and all I get the is "No Applets Running" message at the
bottom, even when I start the Appletviewer application by dropping the HTML
file (below) right on the icon.

BTW- I'm using the Mac Java version 1.0b to compile. The script below which
is supposed to display "Hello world!" below the header "My java Applet
says:".As far as I know, the script below should work, and the HTML which
calls the compiled "HelloWorldApplet.class" should also work.

Anybody got any suggestions of what could be causing my problem (I believe
it's called operator ignorance)....

Thanks in advance for your input:->


import java.awt.Graphics;

class HelloWorldApplet extends java.applet.Applet {

                public void paint(Graphics g) {
                                g.drawString("Hello world!", 5, 25);

<TITLE>Hello to Everyone!</TITLE>
<H2>My java Applet says:</H2>
<APPLET CODE="HelloWorldApplet.class" WIDTH=150 HEIGHT=25></APPLET>


Another BTW: Do I need the </APPLET> tag?

_______________ Landrush - Interactive Marketing Solutions ______________

Robert Stober                                         (352) 319-4779 Pager
WEB: http://www.landrush.com/                         (352) 357-4174 Office
EMAIL: rstober@landrush.com                           (352) 357-1904 Fax

__________ Searchable Database of Florida Real Estate Listings __________

For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/