-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI3.java
More file actions
36 lines (28 loc) · 701 Bytes
/
GUI3.java
File metadata and controls
36 lines (28 loc) · 701 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
/**
* Created by fattyduck on 4/12/15.
*/
import javax.swing.*;
import java.awt.*;
public class GUI3 {
public static void main(String[] args){
Frame613 f = new Frame613();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
class Frame613 extends JFrame{
public Frame613(){
setTitle("613 rocks");
setSize(300,200);
setLocation(100, 200);
Panel613 panel = new Panel613();
Container cp = getContentPane();
cp.add(panel);
}
}
class Panel613 extends JPanel{
public void paintComponent(Graphics g){
super.paintComponent(g);
g.drawString("Hi", 75,100);
}
}