Close a frame

I have a frame and when you click on the 'ok' button I want the frame to close. I cant use System.exit(0); as I dont want the system to close, only the frame should close.
[180 byte] By [javaLa] at [2007-11-27 2:03:17]
# 1
You can use the setVisible method, which makes it disappear, but it will still exist, and could be reshown later.
hunter9000a at 2007-7-12 1:45:26 > top of Java-index,Java Essentials,Java Programming...
# 2
I dont want it to be reshown later. Is there anyway of killing it?
javaLa at 2007-7-12 1:45:26 > top of Java-index,Java Essentials,Java Programming...
# 3
dispose() looks promising. When searching for methods in the API, be sure to check the methods inherited from parent classes as well.
hunter9000a at 2007-7-12 1:45:26 > top of Java-index,Java Essentials,Java Programming...
# 4
Try JInternalFrame...for more details.. http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
Reona at 2007-7-12 1:45:26 > top of Java-index,Java Essentials,Java Programming...