<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
> just call dispose().<br>
<br>
1. <br>
SwingUtilities.invokeAndWait(() -> {
JOptionPane.showInternalInputDialog(...); });<br>
r.waitForIdle();<br>
<br>
dispose what? no reference to the dialog shown. or do you mean again
use of component tree?<br>
<br>
2.<br>
<br>
this trivial way:<br>
<br>
JOptionPane op = new JOptionPane(msg, info, opt, icon);<br>
JDialog dlg = op.createDialog(parentPane, "test");<br>
SwingUtilities.invokeAndWait(() -> {
dlg.setVisible(true); });<br>
r.waitForIdle(2000);<br>
dlg.dispose();<br>
<br>
- doesn't work as well until "ok" button isn't pressed by the user
(and it differs from the initial test variety). not sure if it could
be fixed by some thread tricks.<br>
<br>
Thanks,<br>
Alexander<br>
<br>
<div class="moz-cite-prefix">On 3/11/2016 7:17 PM, Semyon Sadetsky
wrote:<br>
</div>
<blockquote cite="mid:56E2EF83.2080207@oracle.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<br>
<br>
<div class="moz-cite-prefix">On 3/11/2016 6:33 PM, Alexander
Stepanov wrote:<br>
</div>
<blockquote cite="mid:56E2E549.5030303@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
> traverse the component tree<br>
Hm, interesting. But I'm not sure if everything is smoothly as,
e.g., it is also required to close the dialogs one-by-one (for
now the user does that), and I'm not sure if it is easy to
implement.<br>
</blockquote>
Seriously? It is damn easy: just call dispose().<br>
<blockquote cite="mid:56E2E549.5030303@oracle.com" type="cite"> <br>
On 3/11/2016 5:55 PM, Semyon Sadetsky wrote:<br>
<blockquote cite="mid:56E2DC77.2090900@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<br>
<br>
<div class="moz-cite-prefix">On 3/11/2016 5:45 PM, Alexander
Stepanov wrote:<br>
</div>
<blockquote cite="mid:56E2D9F1.9000108@oracle.com" type="cite">*inside
of the internal pane <br>
parent pane <br>
<br>
On 3/11/2016 5:42 PM, Alexander Stepanov wrote: <br>
<blockquote type="cite">Hello Semyon, <br>
<br>
I'm not sure if we can control the location of the dialogs
shown (and of course we don't know the location of the
icons on them), can we? <br>
</blockquote>
</blockquote>
Yes, we can: Component#
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
getLocationOnScreen() and traverse the component tree to find
the Label component with the icon. <br>
<br>
--Semyon<br>
<blockquote cite="mid:56E2D9F1.9000108@oracle.com" type="cite">
<blockquote type="cite">It is clear that the internal
dialogs are located somewhere inside of the internal pane,
but this is not true for the others. <br>
<br>
So (probably I'm wrong) there is seemingly no an elegant
way to predict the location of the icons, and simple
iteration over the screen coordinates (checking for the
pixel color) looks not very reliable. <br>
<br>
Thanks, <br>
Alexander <br>
<br>
On 3/11/2016 5:24 PM, Semyon Sadetsky wrote: <br>
<blockquote type="cite">Hi Alexandr, <br>
<br>
Can the test be automated? It is possible to read color
from the screen with AWT Robot. <br>
<br>
--Semyon <br>
<br>
On 3/11/2016 4:53 PM, Alexander Stepanov wrote: <br>
<blockquote type="cite">Hello, <br>
<br>
Could you please review the fix <br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Eavstepan/8151714/webrev.00/">http://cr.openjdk.java.net/~avstepan/8151714/webrev.00/</a>
<br>
for <br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8151714">https://bugs.openjdk.java.net/browse/JDK-8151714</a>
<br>
- just a single test added. <br>
<br>
Thanks, <br>
Alexander <br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>