Re: A Q about Borland JBuilder9.

From: Me (burgisr_at_hotmail.com)
Date: 10/12/03


Date: Sat, 11 Oct 2003 22:50:39 -0400

I just tried pasting your example into Project Builder and got the same
result. Then I noticed that my Applet tag in the HTML file looked like:

<APPLET archive="Applet0.jar" code="Applet0" width=300 height=150>
</APPLET>

Which means that it was looking in the base level for the applet, but it
wasn't there, so it wasn't initialized.

The reason for that was that you put the Applet0 class in the applet_test
package. So you need to change the code attribute to

code="applet_test.Applet0"

That way it will look in your package for the applet and thus find it.

Good luck

in article bm9dl1$df8$1@reader10.wxs.nl, Aljo_ at aljo_ribw@hotmail.com
wrote on 10/11/03 1:09 PM:

> Hello!
>
> I got a free evaluation copy of Borland's JBuilder9.
>
> I also got a book about JAVA, and I am trying to type, compile and run some
> examples from the book.
>
> The following - very simple - source comes from my book, and I get the
> errormessage that the applet isn't initialised.
>
> Can someone please tell me how to get this to work?
>
> Thanks, it is probably a very minor line that JBuilder9 needs, because the
> book isn't about a specific JAVA compiler.
>
> Here is my source:
> ----start----
> package applet_test;
>
> /**
> * <p>Title: applet test</p>
> * <p>Description: trying to get applets in html working</p>
> * <p>Copyright: Copyright (c) 2003</p>
> * <p>Company: </p>
> * @author aljo
> * @version 1.0
> */
> import java.applet.*;
> import java.awt.*;
>
> public class Applet0 extends Applet
> {
> public void paint(Graphics g) {
> g.drawString("Een bijzonder eenvoudige applet", 10, 20);
> }
> }
> ----end---
> http://home.planet.nl/~aljo.in.pictures (About me, my relatives, hometown,
> etc...)
> http://www.home.zonnet.nl/Amersfoort (About my hometown, lots of photos and
> explanation. Ook in het Nederlands.)
> http://www.ranger49.tmfweb.nl (About the American Forces Network Europe.)
>
>