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

Caret repaint/blinking problem at the end of JTextField

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • generic
    • generic



      Name: skT45625 Date: 05/15/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      Steps to reproduce:

      1. Run the attached test case; the caret is blinking as expected
      2. Enter one or more characters into the JTextField
         in order to force scrolling; the caret stops blinking
      3. Move the caret to the left using the cursor keys;
         the area at the old caret position is not repainted properly

      --

      import javax.swing.*;

      public class CaretBug extends JDialog {
        public CaretBug() {
          JPanel pnl = new JPanel();

            JTextField tf = new JTextField(20);
            tf.setText("Bug Parade - List of the Top 7852 Bugs");
            tf.setCaretPosition(tf.getText().length());
            pnl.add(tf);

          setContentPane(pnl);

          pack();
          setLocation((getToolkit().getScreenSize().width - getWidth()) / 2,
            ((getToolkit().getScreenSize().height) - getHeight()) / 2);
        }

        public static void main(String[] args) {
          new CaretBug().setVisible(true);
        }
      }
      (Review ID: 104834)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: