JDialog in center of screen instead of desired center of JApplet
<p>In my Java applet I have JDialog with couple of radioButtons.</p>

<p>The problem is that this applet is of dimensions 700x300 and the JDialog appears in the center of screen. I want this JDialog to appear in the center of JApplet layout. My constructor invocation looks like this:</p>

<pre><code>final JDialog dialog = new JDialog(
        SwingUtilities.windowForComponent(GUIComponentContainer.getInstance().getDocumentTable()),
        I18nCommonsImpl.constants.selectCertificate(), ModalityType.APPLICATION_MODAL);
</code></pre>

<p>This method:</p>

<pre><code>GUIComponentContainer.getInstance().getDocumentTable()
</code></pre>

<p>returns JTable component which is a child of my JApplet.</p>

<p>I also used JDialog "setLocationRelativeTo" method: </p>

<pre><code>dialog.setLocationRelativeTo(GUIComponentContainer.getInstance().getApplet());
</code></pre>

<p>None of these seem to work. Is there any other way to accomplish my goal?
I searched along SO for similar questions, but didn't see any working solutions.</p>

<p>Thanks in advance.</p>