import java.awt.*; import java.awt.event.*; import java.applet.*; import java.util.*; import MDMFE.*; public class TestApplet extends Applet implements MouseListener{ boolean isStandalone = false; Label label1 = new Label(); Label label2 = new Label(); BorderLayout borderLayout1 = new BorderLayout(); menuPanel label3 = new menuPanel(); //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 TestApplet() { } //Initialize the applet public void init() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { String title1 = "Hi " + new Date(); this.setLayout(borderLayout1); label1.setText(title1); String title = "Hi " + new Date(System.currentTimeMillis()); label2.setText(title); Integer n = new Integer(Calendar.getInstance().DAY_OF_MONTH); String title3 = n.toString(); this.setSize(400,300); this.add(label1, BorderLayout.NORTH); this.add(label2, BorderLayout.CENTER); this.add(label3, BorderLayout.SOUTH); } public void mouseEntered(MouseEvent e){ } public void mouseClicked(MouseEvent e){ } public void mousePressed(MouseEvent e){ } public void mouseExited(MouseEvent e){ } public void mouseReleased(MouseEvent e){ label1.setText(e.getSource().toString()); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } }