import java.awt.*; import java.awt.event.*; import java.applet.*; import oracle.jdeveloper.layout.*; public class ImageTestApplet 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 Image myImage; public ImageTestApplet() { } //Initialize the applet public void init() { try { // xYLayout1.setWidth(400); //xYLayout1.setHeight(300); //this.setLayout(xYLayout1); //this.setBackground(Color.white); myImage=getImage(getDocumentBase(),getParameter("img")); //jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization /* private void jbInit() throws Exception { xYLayout1.setWidth(400); xYLayout1.setHeight(300); this.setLayout(xYLayout1); this.setBackground(Color.cyan); myImage=getImage(getDocumentBase(),getParameter("img")); }*/ public void paint(Graphics g) { g.drawImage(myImage,100,100,this);} //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } }