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

NON-EDITABLE TEXT FIELDS SHOULD SHOW CARET

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs



      Name: pa48320 Date: 06/17/2002


      Bug 4248316 (which correctly stated that the caret should be shown in non-
      editable JTextFields in the windows look and feel) was closed with the following
      explanation:

      "Not displaying the caret if the text component is not editable is the intended
      behavior. To get a different behavior a different Caret
      implementation can be plugged in."

      Just because this was the intended behavior, doesn't mean it is correct. In fact
      it is very, very wrong. Windows look and feel is supposed to look and feel like
      windows. In this particular instance, it does not. Just because there is a
      possible workaround (plugging in a caret implementation) doesn't mean this isn't
      a bug.

      It's important that the caret is shown in non editable text fields for the
      following reasons:

      o Non editable text fields can still get focus. In Swing, you can't visibly see
      that they have focus. We frequently get bug reports from users stating that
      focus has been completely lost from a dialog when it's actually in a non-
      editable text field.

      o The text in non-editable text fields can still be selected. Without a caret,
      it's extremely difficult to use the keyboard to select text.

      o The caret is displayed in non-editable text fields in Windows. It's what users
      using the Windows look and feel expect.

      Please provide a suitable explanation for why the behavior was intended to work
      differently from Windows in the Windows look and feel. Otherwise, reopen the
      bug.

      Note, that all the above applies only to text fields which are not editable. The
      behavior of *disabled* text fields is correct.
      (Review ID: 153713)
      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            pallenba Peter Allenbach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: