title: how to configure joptionpane with no button to dispose()?
body: <p>i would like to display a message while initialisation of data using a dialog.</p>
  <p>But it does't want to close and I can't see what is wrong with this code :</p>
  <pre><code>final JOptionPane optionPane = new JOptionPane(&quot;Information &quot;, JOptionPane.INFORMATION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, new Object[]{}, null);
  JDialog dialog1 = optionPane.createDialog(null,&quot;Wait for init&quot;);
  
  dialog1.setAlwaysOnTop(true);
  dialog1.setVisible(true);
  dialog1.setModal(false);
  
  dialog1.dispose();
  </code></pre>
  <p>Thank you</p>