Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5066208

PIT:JFileChooser dlg in SwingSet2 has the same behaviour for ok and cancel btn

XMLWordPrintable

    • b58
    • generic
    • generic

      It's a demo bug found on the PIT build build/net/jcg-x86-01/export3/SwingBuilds/2004-06-16-int.tiger

      Comments from Sundaranathan on the bug:

                In JColorChooser Demo in SwingSet2 click on
      background/gradient1/gradient2/perimeter button the JColorChooser is
      launched. Now you selected some color and click on "cancel" button the
      selected color is applied to background/gradient1/gradient2/perimeter.
      But this should not happen and was not happening in previous PIT and b51
      also. This happens because till previous PIT "showDialog" method was
      used to create and show JColorChooser but in this PIT the demo code has
      been changed and "createDialog" method is used.

             In "showDialog" if "ok" button is pressed the selected color is
      returned and if "cancel" is pressed then null is returned. But in
      "createdDialog" if i press "ok" or "cancel" the JColorChooser is hidden
      and nothing else is done. I just had a look at the source of
      JColorChooser and found that only component is hidden in case of ok and
      cancel. So that is why this problem is.

            shickeysunw Shannon Hickey (Inactive)
            kbalasubsunw Kannan Balasubramanian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: