diff --git a/Java/practice/WindowExample.class b/Java/practice/WindowExample.class new file mode 100644 index 0000000..0da167d Binary files /dev/null and b/Java/practice/WindowExample.class differ diff --git a/Java/practice/WindowExample.java b/Java/practice/WindowExample.java new file mode 100644 index 0000000..619f24e --- /dev/null +++ b/Java/practice/WindowExample.java @@ -0,0 +1,38 @@ +import java.awt.*; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; + +public class WindowExample extends Frame implements WindowListener { + WindowExample() { + addWindowListener(this); + setSize(400, 400); + setLayout(null); + setVisible(true); + } + + public static void main(String[] args) { + new WindowExample(); + } + + public void windowActivated(WindowEvent e) { + } + + public void windowClosed(WindowEvent e) { + } + + public void windowClosing(WindowEvent e) { + dispose(); + } + + public void windowDeactivated(WindowEvent e) { + } + + public void windowDeiconified(WindowEvent e) { + } + + public void windowIconified(WindowEvent e) { + } + + public void windowOpened(WindowEvent arg0) { + } +} \ No newline at end of file