- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAppletProgramme.java
More file actions
Latest commit
44 lines (35 loc) · 1.11 KB
/
Copy pathAppletProgramme.java
File metadata and controls
44 lines (35 loc) · 1.11 KB
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
40
41
42
43
44
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
packageapplet;
importjava.applet.Applet;
importjava.awt.Color;
importjava.awt.Graphics;
importjava.awt.HeadlessException;
/**
*
* @author APMS
*/
publicclassAppletProgrammeextendsApplet {
/**
* Initialization method that will be called after the applet is loaded into
* the browser.
*/
publicvoidinit() {
setBackground(Color.CYAN);
setForeground(Color.GRAY);
// TODO start asynchronous download of heavy resources
}
publicAppletProgramme() throwsHeadlessException {
}
@Override
publicvoidpaint(Graphicsg) {
super.paint(g); //To change body of generated methods, choose Tools | Templates.
g.drawRect(300, 100, 100, 100);
g.fillRect(350, 120, 100, 100);
g.drawString("hello its applet", 100, 200);
}
// TODO overwrite start(), stop() and destroy() methods
}