//********************************************************************* //* Programmer : Jang Kyu-O(Àå ±Ô¿À) * //* Date : 1996/2/10 * //* E-Mail : kojang@ctkhost.ctk.co.kr * //* Tel : +82-02-3149-4821 * //* Address : Á¦À̾¾Çö ¿¤¸²³×Æ®»ç¾÷º»ºÎ À¥ÆÀ * //********************************************************************* import java.applet.*; import java.awt.*; import java.lang.*; import java.io.*; public class EventTest extends Applet { List theList; public void init() { setLayout(new BorderLayout()); Panel p = new Panel(); p.add(new Label("Event test....")); p.add(new Button("Clear List....")); add("North", p); add("Center", theList = new List(25, false)); theList.addItem("Init event"); } public void paint(Graphics g) { theList.addItem("paint event"); } public void start() { theList.addItem("star event"); } public void destory() { theList.addItem("destory event"); } public void update(Graphics g) { theList.addItem("update event"); } public boolean mouseUp(Event e, int x, int y) { theList.addItem("mouseUp event"); return false; } public boolean mouseDown(Event e, int x, int y) { theList.addItem("mouseDown event"); return false; } public boolean mouseDrag(Event e, int x, int y) { theList.addItem("mouseDrag event"); return false; } /* public boolean mouseMove(Event e, int x, int y) { clearList(); theList.addItem("mouseMove event"); return false; } */ public boolean mouseEnter(Event e, int x, int y) { theList.addItem("mouseEnter event"); return false; } public boolean mouseExit(Event e, int x, int y) { theList.addItem("mouseExit event"); return false; } public void getFocus() { theList.addItem("getFocus event"); } public void gotFocus() { theList.addItem("gotFocus event"); } public void lostFocus() { theList.addItem("lostFocus event"); } public boolean keyDown(Event e, int x) { theList.addItem("keyDown event"); return true; } public boolean action(Event e, Object arg) { if(e.target instanceof Button) { theList.clear(); return true; } return false; } }