<Swing Dev> Why no JInternalDialog?
Artem Ananiev
artem.ananiev at oracle.com
Fri Apr 22 12:26:32 UTC 2011
Hi, Clemens,
On 4/22/2011 4:07 PM, Clemens Eisserer wrote:
> Hi,
>
> Why is there no JInternalDialog classes provided by Swing? Are there
> any plans to introcuce this component in JDK7/8?
> This question came to my mind, because I had to use a JDialog although
> the rest of my app uses internal frames throughout.
>
> I had a look at the JOptionPane.showInternalXXXDialog, however instead
> of relying on some clearly seperated implementation,
> they do it all with some black magic and by using reflection and
> non-public interfaces all directly inside JOptionPane.
you're correct, reflection usage in JOptionPane to call some magic
methods from AWT Container is a good candidate for refactoring. It was
introduced in 1.4.2 (or 1.5?) because at that time there was no API to
start a new modal event loop. In JDK7, this API is public, see
java.awt.SecondaryLoop and EventQueue.createSecondaryLoop() for details.
Thanks,
Artem
> Thanks, Clemens
More information about the swing-dev
mailing list