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

Regression. XToolkit: Cursor shown on components on a blocked window changes when clicked

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b79
    • Introduced In Version:
      6
    • Resolved In Build:
      b87
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      This behavior occurs with the latest mustang build, b79. It does not occur with b66. This occurs on Linux and Solaris platforms.

      Clicking on swing components present in a blocked JFrame changes the cursor shown. I've a JFrame on which I have a JButton and JTextField. The frame is blocked by a modal dialog. When I move the mouse over the JTextField, default cursor is shown. When I click on the text field, the cursor changes to text cursor. Even when I move the mouse over the button, the cursor shown is the same. Now, if I click anywhere on the frame outside the text field, the cursor changes to default cursor.

      This behavior is not reproducible with awt components.

      To reproduce, run the code below:

      import javax.swing.*;
      import java.awt.FlowLayout;

      public class TestCursor {
          public static void main(String[] args) {
              JFrame f = new JFrame("Frame");
              JDialog d = new JDialog(new JFrame(), "Dialog");
              d.setModal(true);
              d.setSize(100, 100);
              d.setLocation(200, 200);
              f.setSize(200, 200);
              f.getContentPane().setLayout(new FlowLayout());
              f.getContentPane().add(new JButton("Button"));
              f.getContentPane().add(new JTextField(15));
              f.getContentPane().add(new JTextArea(5, 10));
              f.setVisible(true);
              d.setVisible(true);
          }
      }

        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: