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