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

REGRESSION: The JTextField's cursor is changed when there is a modal dialog

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b38
    • Introduced In Version:
      6
    • Resolved In Build:
      b81
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      A DESCRIPTION OF THE REGRESSION :
      Windows XP Professional SP1+
      JDK: mustang b73

      Create a jtextfield on the parent window, when a modal dialog is popuped, moving the mouse onto jtextfield at the background should not cause the cursor to be changed.

      REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
      package testbug;

      import java.awt.Dimension;
      import java.awt.FileDialog;
      import java.awt.event.ActionEvent;
      import java.awt.event.ActionListener;

      import java.awt.event.MouseEvent;
      import java.awt.event.MouseMotionAdapter;

      import javax.swing.JFrame;
      import javax.swing.JMenu;
      import javax.swing.JMenuBar;
      import javax.swing.JMenuItem;
      import javax.swing.JTextField;

      public class TestAWTDialog extends JFrame {
          private JMenuBar jMenuBar1 = new JMenuBar();

          private JMenu jMenu1 = new JMenu();

          private JMenuItem jMenuItem1 = new JMenuItem();

          private JMenuItem jMenuItem2 = new JMenuItem();

          private JTextField jTextField1 = new JTextField();

          public TestAWTDialog() {
              try {
                  jbInit();
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }

          private void jbInit() throws Exception {
              this.setJMenuBar(jMenuBar1);
              this.setDefaultCloseOperation(0);
              this.setSize(new Dimension(400, 300));
              this.setTitle("File->Open->Move your mouse onto TextField");
              jMenu1.setText("File");
              jMenuItem1.setText("Open");
              jMenuItem1.addActionListener(new ActionListener() {
                          public void actionPerformed(ActionEvent e) {
                              jMenuItem1_actionPerformed(e);
                          }
                      });
              jMenuItem2.setText("Exit");
              jMenuItem2.addActionListener(new ActionListener() {
                          public void actionPerformed(ActionEvent e) {
                              jMenuItem2_actionPerformed(e);
                          }
                      });
              jMenu1.add(jMenuItem1);
              jMenu1.add(jMenuItem2);
              jMenuBar1.add(jMenu1);
              this.getContentPane().add(jTextField1, null);
          }

          private void jMenuItem2_actionPerformed(ActionEvent e) {
              System.exit(0);
          }

          private void jMenuItem1_actionPerformed(ActionEvent e) {
              FileDialog fd = new FileDialog(this);
              fd.setMode(FileDialog.LOAD);
              fd.setTitle("File dialog");
              fd.setVisible(true);
          }
          
          public static void main(String[] argv){
              TestAWTDialog dlg = new TestAWTDialog();
              dlg.setVisible(true);
          }

      }


      RELEASE LAST WORKED:
      5.0 Update 6

      RELEASE TEST FAILS:
      mustang-beta

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Default cursor
      ACTUAL -
      The cursor is changed to a "I" while it should be a pointer...

      Release Regression From : 5.0u6
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              osemenovsunw Oleg Semenov (Inactive)
              Reporter:
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: