Applet paint problem (only on IE)  
Author Message
Gregory Austwick





PostPosted: 2005-5-31 0:43:00 Top

java-programmer, Applet paint problem (only on IE) I've written an animated, double buffered graphical applet for JDK 1.1.8 (It
has to run without the user having to download a new JRE) that is run in a
table cell on a web page. It uses threads for the animation, with a delay
based on the speed of the animation.

The problem is that on IE, the image does not display until it regains
focus, ie the page is scrolled down, then up, or a second window obscures it
and is then removed. According to the Java console, it has started fine.

It works as it should on FireFox and Opera, and works in IE when it is the
only thing on the page. I have tried everything I can think of (removing the
delay, extra repaints, trying every kind of embedding into the web page,
etc, even trying to get keyboard focus) but to no avail.

Does anyone know what the problem might be?

Thanks,

Greg


 
Mickey Segal





PostPosted: 2005-5-31 1:09:00 Top

java-programmer >> Applet paint problem (only on IE) Sometimes invalidate/validate is needed; the need for this seems to be
different for different JVMs. For a program in a Frame it is simple to test
this hypothesis by resizing the Frame.

"Gregory Austwick" <email***@***.com> wrote in message
news:d7ffq4$7si$email***@***.com...
> It works as it should on FireFox and Opera, and works in IE when it is the
> only thing on the page. I have tried everything I can think of (removing
> the delay, extra repaints, trying every kind of embedding into the web
> page, etc, even trying to get keyboard focus) but to no avail.


 
Gregory Austwick





PostPosted: 2005-5-31 1:34:00 Top

java-programmer >> Applet paint problem (only on IE) I placed the invalidate/validate before the repaint() command in the
thread's Run procedure, as that seems to be the most obvious place to put
it,but it doesn't seem to have helped. Is that the right place for it?

Greg

"Mickey Segal" <email***@***.com> wrote in message
news:email***@***.com...
> Sometimes invalidate/validate is needed; the need for this seems to be
> different for different JVMs. For a program in a Frame it is simple to
> test this hypothesis by resizing the Frame.
>
> "Gregory Austwick" <email***@***.com> wrote in message
> news:d7ffq4$7si$email***@***.com...
>> It works as it should on FireFox and Opera, and works in IE when it is
>> the only thing on the page. I have tried everything I can think of
>> (removing the delay, extra repaints, trying every kind of embedding into
>> the web page, etc, even trying to get keyboard focus) but to no avail.
>
>


 
 
Mickey Segal





PostPosted: 2005-5-31 2:59:00 Top

java-programmer >> Applet paint problem (only on IE) It sounds like that should be fine.

"Gregory Austwick" <email***@***.com> wrote in message
news:d7fiq3$ken$email***@***.com...
>I placed the invalidate/validate before the repaint() command in the
>thread's Run procedure, as that seems to be the most obvious place to put
>it,but it doesn't seem to have helped. Is that the right place for it?


 
 
Andrew Thompson





PostPosted: 2005-5-31 7:38:00 Top

java-programmer >> Applet paint problem (only on IE) On Mon, 30 May 2005 16:42:44 +0000 (UTC), Gregory Austwick wrote:

> Does anyone know what the problem might be?

It is probably the code you are using. Try preparing a small example
that shows the problem, <http://www.physci.org/codes/sscce.jsp>.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
 
Gregory Austwick





PostPosted: 2005-5-31 18:23:00 Top

java-programmer >> Applet paint problem (only on IE) It was. It turned out to be a specialist module elsewhere on the page that
was stealing the focus.

Thank you very much for your help though.

Greg


"Mickey Segal" <email***@***.com> wrote in message
news:email***@***.com...
> It sounds like that should be fine.
>
> "Gregory Austwick" <email***@***.com> wrote in message
> news:d7fiq3$ken$email***@***.com...
>>I placed the invalidate/validate before the repaint() command in the
>>thread's Run procedure, as that seems to be the most obvious place to put
>>it,but it doesn't seem to have helped. Is that the right place for it?
>
>