forked from edugrfc/javabegining
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha.java
More file actions
31 lines (22 loc) · 692 Bytes
/
a.java
File metadata and controls
31 lines (22 loc) · 692 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
import java.awt.*;
import java.awt.event.*;
public class a {
public static class MainWindow extends Frame {
public MainWindow() {
WindowListener listener = new MainWindowListener();
addWindowListener(listener);
}
private class MainWindowListener extends WindowAdapter {
@Override
public void windowClosing(WindowEvent e) {
dispose();
}
}
}
public static void main(String args[]) {
System.out.println("Hello, GRFC!");
Frame f = new MainWindow();
f.setSize(300, 300);
f.setVisible(true);
}
}