added applet code snippets