Re: Fading effect
lando wrote:
Andrew Thompson ha scritto:
...
...have you tried Knute's code?)
Knute's code works very fine as application ,this is why I'm trying
to do an applet version,...without results.
Aaaah.. I had not realised Knute posted an application version.
My web page >>>> http://digilander.libero.it/landodgl/Fadera.html
Un-huhh.. Seeing the File objects still in the code, I
skipped the web page - it would not work.
Here is my variant of (your version of) Knute's code.
<http://www.physci.org/test/applet/slideshow/>
the altered code is linked from the page.
A couple of notes.
- I added status bar messages to tell the user when
images were loaded, but it is criminally slow here
(takes around 2 minutes to load those 4 smallish
images I used), so better feedback would be good.
- The code uses ImageIO, which I would probably do
for applications, but applets do have convenience methods
for loading images that date back to Java 1.1* - it might
be worth using applet methods for getting images in
this applet.
- The original code called System.exit(1) on error,
but an applet is prevented from doing that - that part
should also be changed - but I forgot to change it
(sue me).
* AlphaComposite was introduced in 1.2 (AFAIR), so that
would peg the minimum Java for this applet at Java 1.2.
HTH
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200707/1