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

Non-focusable AWT Choice doesn't allow user to change selection

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b02
    • Introduced In Version:
      7
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      Run the following testcase.

      The test displayes a frame with non-focusable choice inside. Click on the choice by mouse and the pop-up will appear. Click on any item of the pop-up to change the selection of the choice but the selection will be the same as before the click. It looks like user don't have any way to change the selection.

      Additional information.

      >java -version
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b07)
      Java HotSpot(TM) Client VM (build 1.7.0-ea-b07, mixed mode)

      The testcase works fine on JDK7 b01. The bug is regression
      of the fix for 6359035 (Apply WinXP visual styles to AWT native dialogs)
      integrated into b02.

      ----------SOURCE CODE ---------------------

      import java.awt.*;

      public class Test{
      public static void main(String args[]) {
      Frame frame = new Frame();
      Choice choice = new Choice();
      choice.setFocusable(false);
      for (int i = 0; i < 10; i++) {
      choice.add("Choice item " + i);
      }
      frame.add(choice);
      frame.setSize(200,200);
      frame.setVisible(true);
      }
      }

      ----------------------------------------------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dcherepanov Dmitry Cherepanov
              Reporter:
              dcherepanov Dmitry Cherepanov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: