|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface WindowConstants
用于控制窗口关闭操作的常量。由 JFrame、JInternalFrame 和 JDialog 提供的 setDefaultCloseOperation 和 getDefaultCloseOperation 方法使用这些常量。有关设置默认窗口操作的示例,请参阅 The Java Tutorial 中的 Responding to Window-Closing Events 一节。
JFrame.setDefaultCloseOperation(int),
JDialog.setDefaultCloseOperation(int),
JInternalFrame.setDefaultCloseOperation(int)| 字段摘要 | |
|---|---|
static int |
DISPOSE_ON_CLOSE
移除窗口的默认窗口关闭操作。 |
static int |
DO_NOTHING_ON_CLOSE
无操作默认窗口关闭操作。 |
static int |
EXIT_ON_CLOSE
退出应用程序默认窗口关闭操作。 |
static int |
HIDE_ON_CLOSE
隐藏窗口的默认窗口关闭操作 |
| 字段详细信息 |
|---|
static final int DO_NOTHING_ON_CLOSE
static final int HIDE_ON_CLOSE
static final int DISPOSE_ON_CLOSE
注:当 Java 虚拟机 (VM) 中最后的可显示窗口被移除后,虚拟机可能会终止。有关更多信息,请参阅 AWT Threading Issues。
Window.dispose(),
JInternalFrame.dispose(),
常量字段值static final int EXIT_ON_CLOSE
JFrame)可能会根据 SecurityManager 抛出一个 SecurityException。建议您只在应用程序中使用此项操作。
JFrame.setDefaultCloseOperation(int),
常量字段值
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。