-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAppletProgramme.java
More file actions
44 lines (35 loc) · 1.11 KB
/
AppletProgramme.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.
*/
package applet;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.HeadlessException;
/**
*
* @author APMS
*/
public class AppletProgramme extends Applet {
/**
* Initialization method that will be called after the applet is loaded into
* the browser.
*/
public void init() {
setBackground(Color.CYAN);
setForeground(Color.GRAY);
// TODO start asynchronous download of heavy resources
}
public AppletProgramme() throws HeadlessException {
}
@Override
public void paint(Graphics g) {
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
}