You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
431 B
24 lines
431 B
import java.awt.*;
|
|
import java.awt.event.*;
|
|
|
|
class SimpleFrame extends Frame {
|
|
SimpleFrame(String s) {
|
|
super(s);
|
|
setSize(400, 150);
|
|
setVisible(true);
|
|
|
|
addWindowListener(new WindowAdapter() {
|
|
public void windowClosing(WindowEvent ev) {
|
|
dispose();
|
|
System.exit(0);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
new SimpleFrame("Моя программа");
|
|
}
|
|
}
|