import java.awt.*; import java.awt.event.*; import java.applet.*; import oracle.jdeveloper.layout.*; public class TImages extends Applet { XYLayout xYLayout1 = new XYLayout(); boolean isStandalone = false; String img1; String img2; String img3; //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 TImages() { } //Initialize the applet public void init() { try { img1 = this.getParameter("image1", "hlpglobe.gif"); } catch (Exception e) { e.printStackTrace(); } try { img2 = this.getParameter("image2", "hlpbell.gif"); } catch (Exception e) { e.printStackTrace(); } try { img3=this.getParameter("image3");} 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); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } public void paint(Graphics g) { g.drawImage( img1,10,10,this); g.drawImage( img2,30,30,this); g.drawImage( img3,50,50,this); } //Get parameter info public String[][] getParameterInfo() { String pinfo[][] = { {"image1", "String", ""}, {"image2", "String", ""}, {"image3","String",""} }; return pinfo; } }