Canceling Events

Is anybody know how to canceling event ?

the case is like this :

user click the [x] button on the top right of the windows. it will return an close event right? and how do we cancel it ? (cancel the close event)

[230 byte] By [MyPermanaa] at [2007-11-27 11:22:02]
# 1

If you mean like have a pop-up dialog asking if one is sure they want to exit, then you will have to user your own listener. Like for the JFrame, set the default close operation to Do Nothing On Close then add a window listener that will "respond" to a close event where in it's window close method will have the code you write that will give the appropiate dialogs to either continue or cancel.

MaxxDmga at 2007-7-29 14:52:30 > top of Java-index,Desktop,Core GUI APIs...