package applet_example; import java.awt.*; import java.awt.event.*; import java.applet.*; import borland.jbcl.layout.*; import borland.jbcl.control.*; public class applet_example extends Applet { XYLayout xYLayout1 = new XYLayout(); boolean isStandalone = false; //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public applet_example() { } public void paint(Graphics g) { g.drawString("Hello World!",20,50); } //Initialize the applet public void init() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization public void jbInit() throws Exception{ xYLayout1.setWidth(400); xYLayout1.setHeight(300); this.setLayout(xYLayout1); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } }