站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

JFrame - JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

Java

JFrame

Other Swing Changes

Add EXIT_ON_CLOSE defaultCloseOperation Constant

JFrame provides the setDefaultCloseOperation method which can be used to configure the default action when a JFrame is closed. For single framed applications it often the case that closing the frame will exit the application. Previously, developers had to add a WindowListener and do this themselves. To make this common case easier for developers to accomplish, a constant has been added to JFrame that specifies when the frame closes the application should exit: See:

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list.
Sun
Java Software