title: How do I make only the top window active/clickable?
body: <p>I am creative a java app where the user can click on the menu and select 'exit'. When they click 'exit' a pop-up dialogue box appears asking 'are you sure you want to exit?' the option for yes or no is there and these buttons work fine. </p>
  
  <p>When this dialogue box is visible you can still click on the window behind and this will make that window active and place it above the pop up. I don't want that to happen, I only want the pop up window active and for it to stay on top until the user has clicked yes or no. This is the same for the red X in the top left of the window - I don't want the user to be able to click this if the pop up is displaying. Any ideas? I've had a go at consuming the event by using </p>
  
  <pre><code>event.consume();
  </code></pre>
  
  <p>I placed this within an if statement for when the stage2 (my pop up box) was showing and if a oncloserequest is called for stage1 (main window) then the event is consumed. This works fine but once the pop up box is closed (by selecting no) the event is still consumed. </p>
  
  <p>Also when the pop up dialogue is showing you can still click on stage1 behind it and the popup box will be sent to the back.</p>
  
  <p>Someone mentioned modal dialogue boxes? What is this? I don't understand</p>