title: .setModal() method on a JDialog
body: <p>I want to make i so that the parent window cannot be accessed whilst the child window is active. I'm using the .setModal() method of the JDialog class, but it doesn't seem to be working.</p>
  
  <pre><code>   if (clickEvent.getSource().equals(addCheckout1)){
  
          SupermarketCheckoutGUI checkout1 = new SupermarketCheckoutGUI();
          checkout1.setVisible(true);
          checkout1.setSize(670, 400);
  
          checkout1.setModal(false);
      }
  </code></pre>
  
  <p>Just to check, I've tried both true and false, but there is no change.</p>