This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Grey box on loading of applet  RSS feed

 
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
 
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)
 
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).]
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!