| | |
Applet Tutorial |
This is a tutorial to TooHot Crossword Applet. The Java Applet is now under GNU GPL. It's source is open and is delivered with all other necessary files. You can download the package at Shareware!de. You may have a look the exammple-page first. You can have a look at the source-code too.
|
Example
|
Download the zip file and extract it to a directory by example into C:\toohot\applet\. Open the example html-file applet.html with your browser. You should be able to see a crossword puzzle like in the screen-shot on the right. If you can see only a german message, then your browser cannot display applets. Go and get one with applet capability.
|
|
|
Custom Page
To include the applet on your html-page, open your page in a text-editor. Such as Notepad.exe in Windows. Now copy the following html-code into your page (bold fonts):
<applet code="TooHotCrosswordApplet.class"
width=551 height=586>
<param name="WIDTHCELL" value="50">
<param name="DATAURL" value="neuesRaetsel.tpz">
<p>
If you can see this text, then your browser doesn't support Java-Applets. Go and get a new browser if you want to play this crossword puzzle. <a href="http://www.tea.ch/">www.tea.ch</a>
</p>
</applet>
Parts in red can be changed and depends on the puzzle you display.
param name="WIDTHCELL" value="50" - width of each square.
width=551 - width of Applet, use the following calculation: width=WIDTHCELL*ZellenHorizontal+1
height=586 - height of Applet, use the following calculation: height=WIDTHCELL*ZellenVertikal+36
param name="DATAURL" value="neuesRaetsel.tpz" specifies which puzzle file to display. You can create and edit your puzzle file with a text-editor too. The specification of the file-format *.tpz is on this server
Upload
Now upload both .class files, the puzzle file neuesRaetsel.tpz and your html-page applet.html to your webserver.
|