home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
viscobv7.zip
/
vac22os2
/
ibmcobol
/
macros
/
java.smp
< prev
next >
Wrap
Text File
|
1998-02-24
|
854b
|
34 lines
/* Comment */
import java.awt.*;
public class MyClass extends java.applet.Applet {
private Button OkButton = null;
private TextArea aTextArea = null;
public MyClass() {
aTextArea = new TextArea(\0x10, \0x40);
OkButton = new Button("Ok");
}
public void init() {
setLayout(new BorderLayout));
add("Center", aTextArea);
add("South", OkButton);
)
public static void main(String args[]) {
MyFrame frame = new MyFrame("My applet);
MyClass instance = new MyClass();
instance.init();
instance.start();
instance.repaint();
frame.show();
}
}
class public MyFrame extends Frame {
public MyFrame(String title) {super(title);}
public Boolean handleEvent(Event ev) {
if (ev.id == Event.WINDOW_DESTROY)
System.exit(0);
return super.handleEvent(ev);
}
}