title: How can I set my JFrame's setDefaultCloseOperation() value in NetBeans?
body: <p>I'm trying to learn Java so sorry if this is a stupid question, but I seem to be unable to change the default close operation on my JFrame in NetBeans.</p>
  
  <p>In NetBeans I created a JFrame and implemented some controls on it using the NetBeans GUI designer.  However, I noticed that after I close the JFrame, my application would close even though I have another form that is supposed to appear afterwards.</p>
  
  <p>After digging through the JFrame generated code I found:</p>
  
  <pre><code>setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  </code></pre>
  
  <p>From research it appears that this causes the application to close when the frame is closed. I would prefer to not have this happen.  From looking around, it appears I either need to use <code>DISPOSE_ON_CLOSE</code> or <code>DO_NOTHING_ON_CLOSE</code> in order to get the window to close but still have additional code to run.</p>
  
  <p>However, I can't figure out how to get NetBeans to change this value through the designer.  I found the <code>defaultCloseOperation</code> in the Properties -> Bindings window, but every time I enter something into the text area and press enter my text disappears.  The binding has an elipsis but I can't figure out what the binding window actually does.</p>
  
  <p>How can I change my <code>setDefaultCloseOperation()</code> to a new value?</p>