🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Java2 applet L&F changes while applet is running!

#11214
From: Rich Wilkman
Date: Mon, 28 Jun 1999 00:00
58 lines
2611 bytes
William:

Stick some diagnostic printlns in your start() and stop() methods.  When
you navigate away, stop() will be called.  At that point, be prepared
for your Applet to die at any moment.  If you go back, start() should be
called but there's a chance that the L&F info (which is loaded only once
via the static initializer) is lost.  At that point, you should get the
default of Metal.

Or, you could just be chasing a painting bug.  You know you have metal
if nothing is 3D.

All that aside, however, if you must use Java2 in an Applet you really
need to use the Java Plugin.  Otherwise you simply won't have the
correct core classes needed for the new JFC.

-Rich

"William R. Bacon" wrote:
> 
> Hello JB,
> I've created several applets using JBuilder 3, Java 2, and IE5 to test them.
> Each applet has a button that, when clicked, navigates to another HTML page
> containg a different applet.  I am using only awt and swing components.  The
> problem is that when ever I press the  Refresh button on the browser or if I
> navigate back to a previously visited applet, the applets change their Look
> & Feel from Windows to Metal!  I am running the apps on Windows NT 4.  I
> specified in the code to use Windows Look & Feel before the init( ) method,
> like this:
> 
> static {
>     try{
>       UIManager.setLookAndFeel(new
> com.sun.java.swing.plaf.windows.WindowsLookAndFeel());
>     }
>     catch (Exception e) {}
>   }
> 
> Anybody got an idea on what's happening?
> Thanks,
> Redding
> 
> reddingbacon@msn.com

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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: <37780132.A081DE8C@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7l84ig$mqn4@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7e720c45309d2558
X-Google-Attributes: gid111d45,public
From: Rich Wilkman <rwilkman@inprise.com>
Subject: Re: Java2 applet L&F changes while applet is running!
Date: 1999/06/28
Message-ID: <37780132.A081DE8C@inprise.com>
X-Deja-AN: 494958609
Content-Transfer-Encoding: 7bit
References: <7l84ig$mqn4@forums.borland.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