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

PIT. ItemEvent triggered when clicking a Choice placed at the cornor of the screen

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b89
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      This is reproducible with XToolkit on Solaris and Linux platforms. Reproducible only with b85 PIT build.

      When the Choice is placed at the cornor of the screen, such a way that the Choice popup appears right above the choice, an ItemEvent gets triggered when the Choice is clicked to show the popup. ItemEvent is triggered for the already selected item. The popup remains visible even after triggering the ItemEvent.

      This could be a result of the fix for bug 6414552. The following testcase could be used to reproduce it.

      import java.awt.*;
      import java.awt.event.*;

      public class ChoiceTest extends Frame implements ItemListener {

          Choice ch = new Choice();
          Panel p = new Panel ();

          public ChoiceTest () {
              super ("ChoiceTest");

              for (int i = 0; i < 10; i++) {
                  ch.add("Choice item " + i);
              }
              ch.addItemListener(this);
              p.add(ch);
              add("South", p);
              setSize(200, 200);
              setVisible(true);

          }

          public void itemStateChanged (ItemEvent ie) {
              System.out.println(ie);
          }

          public static void main (String args[]) {
              ChoiceTest test = new ChoiceTest();
          }

      }

      The testcase shows a frame with a Choice. Move the frame to the bottom right cornor of the screen in such a way that the choice appears at the cornor of the screen with popup appearing above the Choice. Click the Choice so that the popup items appears right under the mouse pointer. If itemStateChanged is triggered when the popup comes up, the bug is reproduced.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dav Andrei Dmitriev (Inactive)
              Reporter:
              gramachasunw Girish Ramachandran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: