🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10629

Problem running applets that use swing -- Help!

#10629
From: William Bell
Date: Mon, 23 Aug 1999 00:00
56 lines
2238 bytes
I've just started with JBuilder and i've spent a coupla weeks learning
the language using console output -- as a C/C++ programmer since around
'85 i simply love the cleaness and power of the Java environment.

Now i'm trying to move into the visual arena of java programming and
have hit a wall.

When i create a *skeleton* applet using JBuilder and compile it, it
doesn't run in either Netscape 4.6 or Explorer 4.x (Win98's explorer).

If i compile a simple applet:

package AppletTest

import javax.swing.*;
import java.applet.*;
import java.awt.*;

public class Hello extends Applet
{
  public void paint(Graphics g)  { g.drawString("Hello World!",25,50); }

}

//=================================================
<HTML>
<HEAD>
<TITLE>Applet Test</TITLE>
</HEAD>
<BODY>
<APPLET CODE="AppletTest.Hello.class" WIDTH="320" HEIGHT="240">
</APPLET>
</BODY>
</HTML>

When i compile this and dbl-click the hello.html file, the application
runs in both netscape and IE though i still can't get it to run using
"appletviewer hello.html"

If i extend JApplet instead of Applet, the applet no longer runs in all
three cases.

I've been looking through the newsgroups and have seen other people here
with all kinds of applet problems and i certainly didn't expect to run
into problems with something so simple.

This is a very simple case and like i said above, if i try and load an
applet generated by JBuilder with *no* modification, i get absolutely no
joy with it running anywhere!

Is this a simple matter of unzipping some jars somewhere or setting up
some environment variables?  I've downloaded the 1.22 plugins from Sun.

Any help appreciated!

-Will
Technical Details
Message-ID: <37C15070.9E23E858@yahoo.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,333dc4ca20eb7e42,start
X-Google-Attributes: gid111d45,public
From: William Bell <BillyBJr@yahoo.com>
Subject: Problem running applets that use swing -- Help!
Date: 1999/08/23
Message-ID: <37C15070.9E23E858@yahoo.com>
X-Deja-AN: 516163718
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing