🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17488

Re: help with displaying splash screen at start of program...

#17488
From: Alan McDonald
Date: Wed, 04 Nov 1998 00:00
97 lines
4948 bytes
Thanks - I'll take a good look at them
Alan

Richard Wilkman wrote in message <363DE34E.37D1A639@inprise.com>...
>Alan:
>
>All the samples for image loading for applets that i have use a media
>tracker.  It's de rigeur under Java, it's just that sometimes it works
>without one and everyone gets confused.
>
>The examples are at:
>
>http://www.got.net/~rwilkman/java  hop into samples.  First sample on
>the left, source included.
>
>-Rich
>
>Alan McDonald wrote:
>>
>> Wow, thanks for that lengthy answer. I'll certainly do some more work on
>> this. Is there any sample code of how MediaTracker is used? And you are
>> right I am calling it from a jar on th 98 machine. But caled from a jar
on
>> my linux box causes no problems. I don't understand why a jar container
is
>> such aproblem when it's supposed to the standard method of distribution.
>> Alan McDonald
>>
>> John P. McGrath wrote in message ...
>> >Alan McDonald <alan@meta.com.au> wrote:
>> >
>> >> Thanks for your input but what's a media tracker and why does
>> >> exactly the same code bring up an imagecontrol init exception
>> >> on Windows 98? I'd love to deliver just one thing with java
>> >> which appears to be platform independent.  Why don't I need
>> >> a media tracker on my NT? Why does my NT not "use" the image
>> >> before it's loaded?
>> >
>> >MediaTracker is a class defined in the java.awt package that can be
>> >used to track the loading of images.
>> >
>> >The AWT was designed to be used over a (possibly slow) network, so
>> >given that images are often very large, the image loading is done in
>> >the background.  This allows programs to display windows containing
>> >images, and fill in the images as the data arrives, as we have all
>> >seen done in web pages.
>> >
>> >The AWT defines a number of interfaces for dealing with this.  See the
>> >ImageObserver, ImageConsumer, and ImageProducer interfaces in the
>> >package java.awt.image.  The actual implementation of these interfaces
>> >may vary from platform to platform, and from toolkit to toolkit.  As a
>> >result, the behavior may vary when your code is not written correctly.
>> >
>> >My guess is that your code tries to use the image attributes or data
>> >without making certain that they are available, or arranging to do the
>> >appropriate updates when the data is available.  But it may be that,
>> >given the implementation under NT, the image is always loaded in time,
>> >so it appears to work correctly.
>> >
>> >I am somewhat surprised that you see a different behavior between
>> >Windows NT and Windows 98.  Could it be that when you deployed the
>> >application on Windows 98, your image was in a file contained within a
>> >JAR file, but when you ran it on NT, it was in a separate file?  The
>> >first time I noticed this kind of behavior was when I moved everything
>> >into a JAR.
>> >
>> >As Rich pointed out, using the java.awt.MediaTracker class will solve
>> >this problem.  Before I moved to Swing (and started using ImageIcon),
>> >I added a simple loadImage() method to one of my utility classes, that
>> >would get an image and wait for it to complete loading.  I never ran
>> >into the problem after that.
>> >
>> >IMHO, a method like this should have been in the JDK from the start.
>> >Clearly JavaSoft violated the principle that the simplest cases should
>> >be easy to use in this case.
>> >
>> >--
>> >Regards,
>> >
>> >John P. McGrath
>> ><mcgrath@enter.net>
>> ><jpm@nscs.fast.net>
>
>--
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Rich Wilkman
>Senior Quality Assurance Engineer
>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: <71nl4e$7ie23@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bdfec6$139a4920$dfe2bcc0@ITS.city.bloomington.in.us> <01be00e9$40c3b420$dfe2bcc0@ITS.city.bloomington.in.us> <718nje$ghm4@forums.borland.com> <01be0387$44207a40$dfe2bcc0@ITS.city.bloomington.in.us> <71avk2$jc213@forums.borland.com> <3639F2D6.1FCF97DE@inprise.com> <71h4ou$s0u3@forums.borland.com> <MPG.10a6b62cddd458cb9896f2@forums.inprise.com> <71jbe3$1ho5@forums.borland.com> <363DE34E.37D1A639@inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,4720e0d8c1bf48cb
X-Google-Attributes: gidf74b3,public
From: "Alan McDonald" <alan@meta.com.au>
Subject: Re: help with displaying splash screen at start of program...
Date: 1998/11/04
Message-ID: <71nl4e$7ie23@forums.borland.com>
X-Deja-AN: 408019732
References: <01bdfec6$139a4920$dfe2bcc0@ITS.city.bloomington.in.us> <01be00e9$40c3b420$dfe2bcc0@ITS.city.bloomington.in.us> <718nje$ghm4@forums.borland.com> <01be0387$44207a40$dfe2bcc0@ITS.city.bloomington.in.us> <71avk2$jc213@forums.borland.com> <3639F2D6.1FCF97DE@inprise.com> <71h4ou$s0u3@forums.borland.com> <MPG.10a6b62cddd458cb9896f2@forums.inprise.com> <71jbe3$1ho5@forums.borland.com> <363DE34E.37D1A639@inprise.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language