summaryrefslogtreecommitdiff
path: root/javax/swing/JFrame.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-12-21 19:25:10 +0000
committerMichael Koch <konqueror@gmx.de>2004-12-21 19:25:10 +0000
commit250d0bd4d6b7e5f3272911518d3abf9cd7ff4dc8 (patch)
tree202001ab1166d997d6e18aa53764481625c1e7ea /javax/swing/JFrame.java
parent8d68ea6b10e2ffbb1fa5ab2e30dc44ce1c9769ff (diff)
downloadclasspath-250d0bd4d6b7e5f3272911518d3abf9cd7ff4dc8.tar.gz
2004-12-21 Michael Koch <konqueror@gmx.de>
* javax/swing/JApplet.java (HIDE_ON_CLOSE): Removed. (EXIT_ON_CLOSE): Likewise. (DISPOSE_ON_CLOSE): Likewise. (DO_NOTHING_ON_CLOSE): Likewise. (close_action): Likewise. (getDefaultCloseOperation): Likewise. (setDefaultCloseOperation): Likewise. (processWindowEvent): Likewise. (getPreferredSize): Simplified. * javax/swing/JDialog.java (setDefaultLookAndFeelDecorated): Throw exception on wrong argument value. * javax/swing/JFrame.java (setDefaultLookAndFeelDecorated): Likewise. * javax/swing/JInternalFrame.java (setDefaultCloseOperation): Fixed throwing exception on wrong argument value. * javax/swing/JWindow.java (HIDE_ON_CLOSE): Removed. (EXIT_ON_CLOSE): Likewise. (DISPOSE_ON_CLOSE): Likewise. (DO_NOTHING_ON_CLOSE): Likewise. (close_action): Likewise. (processKeyEvent): Likewise. (setDefaultCloseOperation): Likewise. (getPreferredSize): Simplified.
Diffstat (limited to 'javax/swing/JFrame.java')
-rw-r--r--javax/swing/JFrame.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/javax/swing/JFrame.java b/javax/swing/JFrame.java
index aa641caa3..a32f401cc 100644
--- a/javax/swing/JFrame.java
+++ b/javax/swing/JFrame.java
@@ -189,6 +189,10 @@ public class JFrame extends Frame
public static void setDefaultLookAndFeelDecorated(boolean decorated)
{
+ if (operation != DO_NOTHING_ON_CLOSE
+ && operation != HIDE_ON_CLOSE
+ && operation != DISPOSE_ON_CLOSE),
+ throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
defaultLookAndFeelDecorated = decorated;
}