Results 1 to 4 of 4
  1. #1
    CoderMan is offline Member
    Join Date
    Feb 2010
    Location
    Ross Lunar Capsule 2571
    Posts
    15
    Rep Power
    0

    Default Applet drawing before visible

    So, I wrote this big applet interface to one of our local control systems. Lately I modified it so that the first thing it does is show an animation for two seconds before showing the controls. (Just eye candy to impress the clients.)

    This works just fine when I first visit the applet -- the animation plays for two seconds. And it works fine if I clear the class cache and then refresh the browser window.

    However, if I simply refresh the browser window, then only something like the last half of the animation plays, or sometimes none at all. It seems to me like the applet starts running before it is actually possible to see the applet painting in the browser window. So, in other words, the user doesn't start watching the animation until it is half-finished. (Tested this under Firefox.)

    My question: Is there some trick to ensure that nothing is painted to the applet window until it is actually possible for the user to see it?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Not sure. How are you using the Constructor, init() and start() methods?

  3. #3
    CoderMan is offline Member
    Join Date
    Feb 2010
    Location
    Ross Lunar Capsule 2571
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    Not sure. How are you using the Constructor, init() and start() methods?
    I didn't know there was a start() method. Whadda ya know. :o

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    The API doc has lots of useful stuff in it for programmers.

Similar Threads

  1. Tab or Table not visible
    By madhuvanthi2312 in forum SWT / JFace
    Replies: 1
    Last Post: 04-25-2009, 09:00 AM
  2. Drawing a picture (applet) using methods
    By Jeremy8 in forum New To Java
    Replies: 3
    Last Post: 04-07-2009, 11:36 PM
  3. only ~200x200px Applet area visible
    By jumper19 in forum New To Java
    Replies: 8
    Last Post: 02-02-2009, 03:05 AM
  4. Drawing Applet
    By Urgle in forum New To Java
    Replies: 6
    Last Post: 11-19-2008, 08:38 AM
  5. Shape drawing applet not working...
    By evapisces in forum Java Applets
    Replies: 0
    Last Post: 11-17-2008, 11:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •