title: not to return to Dialog when another Dialog is open
body: <p>I'm showing up a Dialog from a JFrame, but when I click outside the dialog, the dialog gets hidden. It's supposed to the dialog won't let you do nothing unless you close it right?</p>
  
  <p>This is my code:</p>
  
  <p>The Dialog calling from First Dialog:</p>
  
  <pre><code>JProductStocking jps = JProductStocking.getProductStoking(JPanelTicket.this, oApp);
  jps.setVisible(true);
  </code></pre>
  
  <p>And this is the JDIalog called:</p>
  
  <pre><code>public class JProductStocking extends javax.swing.JDialog implements BeanFactoryApp{
  public JProductStocking(Component parent, boolean modal) {
          //super(parent, modal);
          initComponents();
  
      }
  
  public static JProductStocking getProductStoking(Component parent, AppView app) {
          Window window = getWindow(parent);
  
          JProductStocking myMsg;
          if (window instanceof JFrame) { 
              myMsg = new JProductStocking((Frame) window, true);
          } else {
              myMsg = new JProductStocking((Dialog) window, true);
          }
          myMsg.init(app, parent);
          myMsg.applyComponentOrientation(parent.getComponentOrientation());
          return myMsg;
      }
  
       private static Window getWindow(Component parent) {
          if (parent == null) {
              return new JFrame();
          } else if (parent instanceof JFrame || parent instanceof Dialog) {
              return (Window) parent;
          } else {
              return getWindow(parent.getParent());
          }
      }
  
      public void init(AppView app, Component parent) {
          oApp = app;
         // m_dlSales = (DataLogicSales) app.getBean("com.openbravo.pos.forms.DataLogicSales");
          initComponents();
          ProductList = new ArrayList();
          this.setResizable(false);
          setLocationRelativeTo(parent);
  
      }
  }
  </code></pre>
  
  <p>Im not calling the jDialog well? or what im doing wrong?</p>