Article View: borland.public.jbuilder.java.swing
Article #10631Re: Problem running applets that use swing -- Help!
From: Rich Wilkman
Date: Mon, 23 Aug 1999 00:00
Date: Mon, 23 Aug 1999 00:00
84 lines
3211 bytes
3211 bytes
Will:
http://www.got.net/~rwilkman/java and hit the basics on writing
applets. You'll probably want to read the "Why you shouldn't write
Applets" article as well; just to get a better big picture of applets.
Step 1 after that is to back off of JDK 1.2 to JDK 1.1 and not use Swing
(JFC which is JApplet).
-Rich
William Bell wrote:
>
> 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
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Quality Assurance Manager
Borland JBuilder Team
If you see something that looks like an opinion up there,
it's mine and mine alone.
Mail sent to me from the newsgroups won't bounce but will
be ignored. If I have time, I'll respond, but you have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<37C172A7.D079623E@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37C15070.9E23E858@yahoo.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,333dc4ca20eb7e42 X-Google-Attributes: gid111d45,public From: Rich Wilkman <rwilkman@inprise.com> Subject: Re: Problem running applets that use swing -- Help! Date: 1999/08/23 Message-ID: <37C172A7.D079623E@inprise.com> X-Deja-AN: 516213878 Content-Transfer-Encoding: 7bit References: <37C15070.9E23E858@yahoo.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing