Java Applets

By jkubackijkubacki

Description

Easy way to include Java applets:

  • create Java applet (ex. ChaosGame.class) and upload it into your wiki page
  • create simple HTML page to display the applet, upload it into your wiki page but use html extension in file name, use for example xxx (ex. chaos.xxx).
  • embed the HTML page into your wiki page using [[iframe]] tag

* use specific naming convention for the URL of your html file:
http://your_name.wdupload.wikidotsyndication.com/localfiles/your_page/chaos.html

Code

Simple HTML page (chaos.html):

<html>
    <head>
        <title>Chaos Game</title>
    </head>
    <body>
        <applet code="ChaosGame.class" height="128" width="128"></applet>
    </body>
</html>

Code to be included in your wiki page:

[[iframe http://your_name.wikidot.com/local--files/your_page/chaos.html]]

In action

[[iframe http://snippets.wikidot.com/local--files/code:java-applets/chaos.html]]

To remove the border and so on - see Wiki syntax.


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by jkubacki


Rate this solution

If you think this solution is useful — rate it up!

rating: +8+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License