package slipapp; import java.net.MalformedURLException; import java.net.URL; import javax.swing.JApplet; /** * * @author Doys * @see นี่คือ Class แรกที่ Applet เรียกใช้งาน */ public class AppletPrinting extends JApplet { @Override public void init() { try { String printingName = getParameter("printingName"); String urlXmlData = getParameter("urlXmlData"); String urlXmlMaster = getParameter("urlXmlMaster"); String urlXmlDetail = getParameter("urlXmlDetail"); PrintingApplet pa = new PrintingApplet(this, urlXmlData, urlXmlMaster, urlXmlDetail); } catch (Exception ex) { Alert(ex.getMessage()); } } public void Alert(String alert) { try { this.getAppletContext().showDocument(new URL("javascript:alert(\"" + alert + "\")")); } catch (MalformedURLException me) { } } }