Created
June 11, 2014 17:44
-
-
Save ctrueden/251e3a6e2906b1c4c0ee to your computer and use it in GitHub Desktop.
Dialog behavior test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AWT | |
final java.awt.Dialog dialog = new java.awt.Dialog(null, "Hello AWT"); | |
dialog.addWindowListener(new java.awt.event.WindowAdapter() { | |
public void windowClosing(java.awt.event.WindowEvent e) { dialog.dispose(); } | |
}); | |
dialog.setSize(300, 100); | |
dialog.setVisible(true); | |
// Swing | |
jdialog = new javax.swing.JDialog(null, "Hello Swing"); | |
jdialog.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); | |
jdialog.setSize(300, 100); | |
jdialog.setVisible(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment