-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNewApplet.java
More file actions
58 lines (50 loc) · 1.49 KB
/
NewApplet.java
File metadata and controls
58 lines (50 loc) · 1.49 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* NewApplet.java
*
* Created on Aug 19, 2002, 9:44:23 PM
*/
/**
*
* @author g1.test1
*/
import java.applet.*;
import java.awt.*;
public class NewApplet extends java.applet.Applet {
public void paint(Graphics g)
{
g.setColor(Color.red);
g.fillRect(20, 20, 100, 50);
g.setColor(Color.blue);
g.fillOval(45, 20, 50, 50);
g.drawString("hello java", 100, 50);
g.fillRoundRect(10, 20, 30, 40, 25,25);
g.drawArc(WIDTH, WIDTH, WIDTH, WIDTH, ABORT, ABORT);
g.drawLine(70, 80, 100, 100);
}
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
/** This method is called from within the init() method to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setLayout(new java.awt.BorderLayout());
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}