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

Wrong cursor is shown for Swing component positioned over AWT TextField or TextArea

    XMLWordPrintable

Details

    • unknown
    • other

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b104)
      Java HotSpot(TM) 64-Bit Server VM (build 19.0-b05, mixed mode)

      Also reproducible on 6u21

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 7 Ultimate

      A DESCRIPTION OF THE PROBLEM :
      Run next code snippet and move mouse over JButton. Instead of arrow cursor you will see "caret" cursor.
      Same for TextArea

      import java.awt.TextField;
      import javax.swing.JButton;
      import javax.swing.JFrame;
      import javax.swing.SpringLayout;
      public class MixingCursorTextField {
      public static void main(String[] args) {
              final JFrame f = new JFrame("Mixing : Simple Overlapping test");
              f.setLayout(new SpringLayout());
              f.setSize(200, 200);

              TextField tf = new TextField("AWT Text Field");
              f.add(new JButton("JButton"));
              f.add(tf);

              f.setVisible(true);
          }}

      Attachments

        Activity

          People

            Unassigned Unassigned
            sgrinev Sergey Grinev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: