The APPLET Tag Java Help


The source code starts with the APPLET lag for Lavatron, there, This applet looks best when the width is an even multiple of the bulb Size and is the bulb size times the source image heiglu. The only parameter is Ior the name of the source image file, named imge.

Lavatron java

The main applet is small, about J 00 lines of java so icon code. However, is also a support class that is requited, which is described in the next section.

init( )

The H method first determines the size of the applet by using get Size( ), and then rounds lip the size to a multiple of the’ bulb 0 size, specified by bulb S. It then creates an image that SIZE, called use :15 ,I double buffer for the display. The Crap object used for drawing is saved in off Graphics. The Size of the applet, in bulb units rathor than pixels, is stored in bulbs W,bulbs H. Next, the image of u column of created in the size of the image to create, Then the named in the is loaded. This is done by passing the result of get image() to Media Tracker’s add image f ) method, and then calling waitForID( ), which waits until the image is fully loaded before returning, – To draw the blown-up version of this image, initt ) needs to retrieve the color information 0 each pixel In the image. first, it obtains the size of the image, using get Width( ) and getHeighH ), saving the width in pixscan, It then assigns pixels to a new array of pixscan integers. Then a Pixel Grabber is created. When grab) is called, the array is filled in with the color values. . The final step of inil( ) is to paint black bulbs on the offscreen image,’ which makes the effect more dramatic as the image scrolls from the right side ,revealing lighted bulbs.

  • Feel free to send us an inquiry, we will reply back in hours.


Posted on September 18, 2014 in The Lavatron Applet A Speirts Arena Display

Share the Story

About the Author

Back to Top