// Applet Package Imports import java.awt.*; import java.applet.Applet; // Main Applet public class Client extends Applet { public _Screen1 Screen1; // Task Object public Object taskdata; // access for screen flipping is provided here public CardLayout layoutManager; public void init() { layoutManager = new CardLayout(); setLayout(layoutManager); construct(); // create an instance of the applet panels Screen1 = new _Screen1(this, this); // add the main panel add("Screen1", Screen1); Screen1.setDefaultProperties(); Screen1.MButton1.setDefaultProperties(); Screen1.MTextField1.setDefaultProperties(); Screen1.initialize(); Screen1.MButton1.initialize(); Screen1.MTextField1.initialize(); } } class _Screen1 extends Screen { // A Panel Container class. This produces a generic container. public _MButton1 MButton1; public _MTextField1 MTextField1; // Task Object public Object taskdata; public Client parent; _Screen1(Client app, Client aParent) { applet = app; parent = aParent; construct(); // create instances of all subcomponents MButton1 = new _MButton1(applet, this); MTextField1 = new _MTextField1(applet, this); // add instances to the panel setLayout(null); add(MTextField1); add(MButton1); } } class _MTextField1 extends MTextField { // TextField is a component that allows the editing of a single line of text. // See TextField for more documentation // Task Object public Object taskdata; public _Screen1 parent; _MTextField1(Client app, _Screen1 aParent) { applet = app; parent = aParent; construct(); // create instances of all subcomponents // add instances to the panel } public boolean gotFocus(Event evt, Object what) { // local variables // event body return(true); } public boolean lostFocus(Event evt, Object what) { // local variables // event body return(true); } } class _MButton1 extends MButton { // A class that produces a labeled button component. // See Button for more documentation // Task Object public Object taskdata; public _Screen1 parent; _MButton1(Client app, _Screen1 aParent) { applet = app; parent = aParent; construct(); // create instances of all subcomponents // add instances to the panel } public boolean action(Event evt, Object what) { // local variables // event body return(true); } }