<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks!<br>
    <br>
    <div class="moz-cite-prefix">On 3/18/2016 8:46 PM, Semyon Sadetsky
      wrote:<br>
    </div>
    <blockquote cite="mid:56EC3EF1.9060502@oracle.com" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Looks good.<br>
      <br>
      --Semyon<br>
      <br>
      <div class="moz-cite-prefix">On 3/17/2016 10:15 AM, Alexander
        Stepanov wrote:<br>
      </div>
      <blockquote cite="mid:56EA598A.9070003@oracle.com" type="cite">
        <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type">
        Hello Alexandr,<br>
        <br>
        > it should be created and used on EDT<br>
        the following methods affecting UI are run on EDT: UI(),
        showDialogOrFrame() and dispose() operations in doTest (the
        final 'dispose' is indeed should be run on EDT as well). The
        robot operations/checks are executed on main thread using
        volatile/final references to get the coordinates.<br>
        <br>
        But if this is still not safe enough, then this 'extends JFrame'
        could be easily removed as it doesn't make any special sense.<br>
        <br>
        Please see the updated fix:<br>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://cr.openjdk.java.net/%7Eavstepan/8151714/webrev.02/">http://cr.openjdk.java.net/~avstepan/8151714/webrev.02/</a><br>
        (the transform-based scale check was also removed as it seems
        that the fix for JDK-8150844 is near to be pushed).<br>
        <br>
        Thanks,<br>
        Alexander<br>
        <br>
        <br>
        <div class="moz-cite-prefix">On 3/16/2016 8:55 PM, Alexander
          Scherbatiy wrote:<br>
        </div>
        <blockquote cite="mid:56E99DFC.4040704@oracle.com" type="cite">
          <meta content="text/html; charset=utf-8"
            http-equiv="Content-Type">
          <br>
          The MultiResolutionJOptionPaneIconTest extends JFrame so it
          shoud be created and used on EDT as others Swing components.<br>
          <br>
          Thanks,<br>
          Alexndr.<br>
          <br>
          <div class="moz-cite-prefix">On 14/03/16 18:26, Alexander
            Stepanov wrote:<br>
          </div>
          <blockquote cite="mid:56E6CA03.5080202@oracle.com" type="cite">
            <meta content="text/html; charset=utf-8"
              http-equiv="Content-Type">
            Hello Semyon,<br>
            <br>
            > JOptionPane.showInternalInputDialog() is an utility
            method<br>
            Yes, the initial intention was to check the icons for all
            the dialogs created by means of these utilities. But in
            principle these options could be skipped, and the test could
            be limited by checking the icons for JOptionPane's
            createDialog() and createInternalFrame() methods.<br>
            <br>
            In such a case the test indeed may be easily converted to
            the automated one.<br>
            <br>
            > What doesn't work exactly, the dispose() call?<br>
            Please disregard. Simply shouldn't create and dispose the
            dialog at the same EDT.<br>
            <br>
            So please see the updated webrev:<br>
            <a moz-do-not-send="true" class="moz-txt-link-freetext"
              href="http://cr.openjdk.java.net/%7Eavstepan/8151714/webrev.01/">http://cr.openjdk.java.net/~avstepan/8151714/webrev.01/</a><br>
            <br>
            Thanks,<br>
            Alexander<br>
            <br>
            <div class="moz-cite-prefix">On 3/11/2016 8:38 PM, Semyon
              Sadetsky wrote:<br>
            </div>
            <blockquote cite="mid:56E30294.3030209@oracle.com"
              type="cite">
              <div class="moz-text-html" lang="x-unicode">
                <meta content="text/html; charset=utf-8"
                  http-equiv="Content-Type">
                <br>
                <br>
                <div class="moz-cite-prefix">On 3/11/2016 7:38 PM,
                  Alexander Stepanov wrote:<br>
                </div>
                <blockquote cite="mid:56E2F49C.4020006@oracle.com"
                  type="cite">
                  <meta content="text/html; charset=utf-8"
                    http-equiv="Content-Type">
                  > 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>
                </blockquote>
                JOptionPane.showInternalInputDialog() is an utility
                method.<br>
                <blockquote cite="mid:56E2F49C.4020006@oracle.com"
                  type="cite"> <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>
                </blockquote>
                What doesn't work exactly, the dispose() call? <br>
                <br>
                --Semyon<br>
                <blockquote cite="mid:56E2F49C.4020006@oracle.com"
                  type="cite"> <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>
                </blockquote>
                <br>
              </div>
            </blockquote>
            <br>
          </blockquote>
          <br>
        </blockquote>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>