Closing one window kills the whole program

I have a method within an inner class which creates a new window. Heres sort of what my code looks like:

if(e.getSource == buttone)

{

new entryEditor().theEditor();

e_frame.setDefaultCloseOperation(EXIT_ON_CLOSE);

that close operation thing probably isn't exact, but i know i have it on EXIT ON CLOSE. and when i exit the window the whole program closes. How do i remedy this?

I also tried e_frame.setVisible(false)

to hide the window, then add some clearing commands like e_textfield.setText(""); But i get a defining of e_frame error.

[713 byte] By [kavon89a] at [2007-10-3 9:23:35]
# 1
> e_frame.setDefaultCloseOperation(EXIT_ON_CLOSE);Don't use EXIT_ON_CLOSERead the API. There are other values you can use.
camickra at 2007-7-15 4:37:25 > top of Java-index,Desktop,Core GUI APIs...
# 2
> > e_frame.setDefaultCloseOperation(EXIT_ON_CLOSE);> > Don't use EXIT_ON_CLOSE> > Read the API. There are other values you can use.Of which DISPOSE_ON_CLOSE is probably what you want.
duckbilla at 2007-7-15 4:37:25 > top of Java-index,Desktop,Core GUI APIs...
# 3
Searched the API and found DISPOSE_ON_CLOSE. worked fine. ty
kavon89a at 2007-7-15 4:37:25 > top of Java-index,Desktop,Core GUI APIs...