import java.awt.*; import java.awt.event.*; import java.applet.*; import oracle.jdeveloper.layout.*; import java.util.*; import java.text.*; public class VijitaTestApplet extends Applet { XYLayout xYLayout1 = new XYLayout(); boolean isStandalone = false; Label lblDate = new Label(); //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 VijitaTestApplet() { } //Initialize the applet public void init() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { Calendar gc=Calendar.getInstance(); //Date d=new Date(); //Calendar c=Calendar.getInstance(); //c.setTime(d); TimeZone tz=TimeZone.getDefault(); String s=tz.getID(); // tz.setID(s); xYLayout1.setWidth(400); xYLayout1.setHeight(300); //lblDate.setText("Time: "+gc.getTime()+"Time Zone:"+s); lblDate.setText("New Time:"+ new Date()+"Time Zone:"+s ); this.setLayout(xYLayout1); this.setBackground(SystemColor.control); this.add(lblDate, new XYConstraints(30, 25, 333, 32)); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } }