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

Strange behaviours when typing @ or '

XMLWordPrintable

    • b84
    • generic, x86
    • generic, windows_xp, windows_vista

      FULL PRODUCT VERSION :
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b71)
      Java HotSpot(TM) Client VM (build 16.0-b08, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [version 6.0.6002]

      A DESCRIPTION OF THE PROBLEM :
      Typing a @ in a JTextArea when running over JRE7 delete the following character. Typing a ' first move the cursor to the next character then insert '

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run the following code with JRE7b71 then insert a few blank lines (say 3 times) then type 'test', then type @ on the first line, set the cursor between the e and s of test then type '

      import java.awt.Dimension;
      import javax.swing.JOptionPane;
      import javax.swing.JTextArea;
      public class Main {
          public static void main(String[] args) {
            JTextArea jta = new JTextArea();
            jta.setPreferredSize(new Dimension(200, 200));
            JOptionPane.showMessageDialog(null, jta);
          }
      }


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The content of the JTextArea should be:
      @


      te'st
      ACTUAL -
      The content of the JTextArea is:
      @

      tes't

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.Dimension;
      import javax.swing.JOptionPane;
      import javax.swing.JTextArea;
      public class Main {
          public static void main(String[] args) {
            JTextArea jta = new JTextArea();
            jta.setPreferredSize(new Dimension(200, 200));
            JOptionPane.showMessageDialog(null, jta);
          }
      }

      ---------- END SOURCE ----------

      Release Regression From : 6u13
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            yan Yuri Nesterenko
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: