[3944] in java-interest
[Fwd: How do I [reload] without paint()'ing ... does anyone know another route?]
daemon@ATHENA.MIT.EDU (John D. Kane)
Tue Dec 5 01:51:58 1995
Date: Tue, 05 Dec 1995 00:12:09 -0500
From: "John D. Kane" <john@insightnews.com>
To: java-interest@java.sun.com
Path: news.worldlinx.com!news
From: "John D. Kane" <john@insightnews.com>
Newsgroups: comp.lang.java
Subject: How do I [reload] without paint()'ing ... does anyone know another route?
Date: Tue, 05 Dec 1995 00:11:47 -0500
Organization: INSIGHT New Media Publishing
Lines: 30
Message-ID: <30C3D493.3620@insightnews.com>
NNTP-Posting-Host: 204.101.142.10
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b2 (Windows; I; 32bit)
I've written a java applet which displays a company logo like a
typewriter is typing it, with pauses, a typewriter keyclick sound,
etc. The meat of the logo is in a method I created called
onePaint(), because I only want the logo to run once -- when someone
first loads the page (this is called in the run() method). In the
overridden paint() method, I simply display the end result of the
onePaint() method which is a static picture. To get the static
picture, I do everything I do in the onePaint() method, but without
the sounds, pauses etc. The end result is simply painted again
without all the bells and whistles ... good, so far.
The problem occurs when the user reloads the page ... it appears
that the paint routine is called once, displaying the static logo
(the end result) on the screen, and then the onePaint() method is
run. Since the end result is showing, the user can't see the letters
being displayed to the screen, one after the other. The sounds are
there, but since the new letters are being displayed over top of the
old letters, it appears nothing is happening visually.
I want the logo applet to completely clear on a [Reload] and start
from scratch, but the paint() routine seems to be getting in the
way, even though I need the paint routine to display the static
image after the logo applet is run. Can anyone kindly offer me any
advice, an alternate method? I think that I could use paint,
repaint, and update more efficiently, but I can't see how right now.
Do you know of a sample applet out there somewhere that would fit
the same situation?
Thanks
John
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com