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

Windows: Cursor set on a choice added in a card layout is shown elsewhere also

XMLWordPrintable

    • x86
    • windows_xp

      I've a card layout in which a Choice is added. The choice appears in its preferred size and appears at the center of the card layout. The cursor set on the choice is move cursor. Even though the choice appears at the center of the layout, cursor becomes move cursor when mouse is moved to the top of the frame. It cursor becomes move cursor only at a small portion, below the title bar.

      This is reproducible only on Windows, from 1.4.2 onwards.

      To reproduce:
      Run the below testcase, move the mouse to the top of the frame, just below the title bar.
      If the cursor shown is move cursor, bug is reproduced.

      import java.awt.*;

      public class CardLayoutTest {
          
          public static void main(String[] args) {
              Frame f = new Frame();
              f.setLayout(new CardLayout());
              Choice ch = new Choice();
              ch.addItem("Item1");
              ch.addItem("Item2");
              ch.addItem("Item3");
              ch.addItem("Item4");
              ch.setCursor(new Cursor(Cursor.MOVE_CURSOR));
              f.add(ch, "choice");
              f.setSize(200, 200);
              f.setVisible(true);
          }
      }

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

              Created:
              Updated:
              Imported:
              Indexed: