forked from deepdalsania/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppletDemo.java
More file actions
39 lines (30 loc) · 874 Bytes
/
AppletDemo.java
File metadata and controls
39 lines (30 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package applet;
import java.applet.Applet;
import java.awt.Graphics;
@SuppressWarnings("serial")
public class AppletDemo extends Applet {
String s = "";
@Override
public void init() {
// TODO Auto-generated method stub
s+="init "; //only one time call means at initialization time
}
public void start() {
// TODO Auto-generated method stub
s+="start "; // call after init method but when we close temporary again it call
}
@Override
public void stop() {
// TODO Auto-generated method stub
s+="stop "; //when we minimize the appletviewer at that time it call after that start is again call at maximize time
}
@Override
public void destroy() {
// TODO Auto-generated method stub
System.out.println("Applet Destroy permanently");
}
public void paint(Graphics g) {
// TODO Auto-generated method stub
g.drawString(s, 50, 50);
}
}