Java Image Projector EASY USAGE
An easy usage is explained dividing into taking step 1, 2, and 3
as an example of Java Image Projector-1.
* * * Step 1
(1)Preparation for Applet
It is necessary to file the undermentioned name.
Put these files in a suitable folder.
Imgpro1.class
Btcanvas1.class
BtPanel1.class
Txtpro.class
TxtPanel.class
(2)Preparation for the displayed image files.
The file which can be displayed is JPG and GIF.
Three undermentioned file is prepared as an example and explains.
Put these image file in the same folder as the applet.
sample1.jpg
sample2.jpg
sample2.jpg
(3)Making of HTML file
Then, make the HTML file which makes the applet operate
as shown in the undermentioned example.
<HTML><BODY>
<HEAD><TITLE>Java</TITLE></HEAD>
<APPLET code=Imgpro.class width=600 height=400>
<PARAM name="images" value="sample1.jpg|sample2.jpg|sample3.jpg">
</APPLET>
</BODY></HTML>
The file of the applet specifies only Imgpro.class.
The program refers to the file of the remainder.
Place the image file sequentially by "|" delimitation.
And, put HTML file in the same folder as the applet,too.
We will have put it as an example by the undermentioned name.
java.html
(4)Execution of applet
Now, the applet will runs by this.
Let's try it with Internet Exproler or Netscape.
- Start method -
4-1 Click "File" and "Open" from the menu.
4-2 When the dialog box appears, java.html (HTML file) click.
Then Java applet will runs.
Did the applet run correctly? When applet does not run,
confirm whether previous (1) (2) (3) is correct again.
You can see the example running applet. Here
* * * Step 2
Let's change the background color.
Add the following parameter to the applet tag of the HTML file made ahead.
<PARAM name="paramColor" value="2"> -> add
- entire file -
<HTML><BODY>
<HEAD><TITLE>Java</TITLE></HEAD>
<APPLET code=Imgpro.class width=600 height=400>
<PARAM name="images" value="sample1.jpg|sample2.jpg|sample3.jpg">
<PARAM name="paramColor" value="2">
</APPLET>
</BODY></HTML>
Start the applet running by this.
The background color changed from the black into red.
You can see the example running applet. Here
The background color is changed by changing the value of
paramColor in a word.
0:black (default)
1:white
2:red
3:gray
However, when these are not your favorite colors,
all colors can be specified by the following parameter specification.
<PARAM name="paramRGB" value="ffff00"> -> example yellow
The color is specified by RGB using paramRGB.
RGB displays the color in a red, green, blue three primary colors.
Example
ff0000:red
00ff00:green
0000ff:blue
ffffff:white
f08080:pink
80f080:light green
ffff00:yellow
* * * Step 3
Now, change the display style.
Add the following parameter to the HTML file made ahead further.
<PARAM name="paramDisplay" value="2">
Start the applet running by this.
The image display came to change from the left to the right.
You can see the example running applet. Here
Various image displays become possible by changing the value of this paramDisplay.
The display style can specify undermentioned (1-10).
Image projector-1
<PARAM name="paramDisplay" value="1"> --- Put a picture center(default)
<PARAM name="paramDisplay" value="2"> --- Slide left to right
<PARAM name="paramDisplay" value="3"> --- Slide top to down
<PARAM name="paramDisplay" value="4"> --- Blind on off
<PARAM name="paramDisplay" value="5"> --- Multi display
<PARAM name="paramDisplay" value="6"> --- Center to right and left
<PARAM name="paramDisplay" value="7"> --- Fade in out
<PARAM name="paramDisplay" value="8"> --- Left & Right slide
<PARAM name="paramDisplay" value="9"> --- Rectangle
<PARAM name="paramDisplay" value="10"> --- Open from center
|