import java.awt.*; import java.awt.event.*; import java.applet.*; import oracle.jdeveloper.layout.*; public class MyApp extends Applet { XYLayout xYLayout1 = new XYLayout(); boolean isStandalone = false; String image; //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 MyApp() { } //Initialize the applet Image img1; public void init() { try { image = this.getParameter("img", "hlpglobe.gif"); } catch (Exception e) { e.printStackTrace(); } try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { xYLayout1.setWidth(400); xYLayout1.setHeight(300); this.setLayout(xYLayout1); this.setBackground(SystemColor.control); img1=getImage(getDocumentBase(),getParameter("img")); } //Get Applet information public void paint(Graphics g) { g.drawImage(img1,10,10,this);} public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { String pinfo[][] = { {"img", "String", ""}, }; return pinfo; } }