• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grey box on loading of applet

 
Andrew Edmonds
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there any way to change the colour of the grey box that the browser displays whilst an applet is being loaded. Repainting the area within the applet minimises the time the box is there but doesn't get rid of it. I read an article somewhere that says it's not possible, but then how come at http://news.bbc.co.uk/ the ticker applet that displays latest news quite clearly shows a white background during loading.
Thanks for any help
Andrew
 
Glen Tanner
Ranch Hand
Posts: 147
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tested this, but it looks like this page passes in a white background color parameter(255,255,255) into the applet thru the APPLET tag.
The author most likely uses this color when calling setBackground() in the init() method of the applet.
Here is the Applet tag from the source you referenced:
<APPLET CODE="lightticker2.class" CODEBASE="/java/" WIDTH=300 HEIGHT=50>
<PARAM NAME=bgcolor VALUE="255,255,255">
<PARAM NAME=linkcolor VALUE="255,0,0">
<PARAM NAME=textcolor VALUE="0,0,0">
<PARAM VALUE="252" NAME="SectionID">
<PARAM VALUE="3" NAME="LanguageID">
<PARAM NAME=RegionID VALUE=-1>
<PARAM NAME=SubRegionID VALUE=-1>
</APPLET>
[This message has been edited by Glen Tanner (edited November 27, 2000).]
 
Glen Tanner
Ranch Hand
Posts: 147
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this. I can't get it to work. Anyone have any ideas???
(I'm using the 1.3 Plug-In)
 
Noah Carroll
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one way to do it is to only have a few lines in your init method. They should simply have a blank box with a white background, then write your paint(since it is always called) method so it will test a variable to see if it is the first time the applet has run. Then make another method such as secondInit() which will create everything else, then revalidate the screen

this should give you the effect you desire and stop the grey box look.
------------------
I hope its helps, feel free to email me noahcarroll@juno.com
[This message has been edited by Noah Carroll (edited December 05, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic