setEditable(false) but can still backspace to delete text.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.1.5
    • Affects Version/s: 1.1.2
    • Component/s: client-libs
    • None
    • 1.1.5
    • generic
    • windows_95
    • Not verified

      7/18/97 cah filed for Doug Leeper, ISA Services, Inc.


      Create a JTextField and place in a container of your choice.
      Set the edit state to false (setEditable( false ))

      Select the text in the field and press backspace. The text is deleted. This shouldn't happen. All other key inputs are disabled.

      Here is my sample code:

      import com.sun.java.swing.*;
      import com.sun.java.swing.text.*;
      import java.awt.*;

      public class Foo {
          public static
          void main(String args[]) {
              JTextField fld;
              Frame f = new Frame();
              f.setLayout(new BorderLayout());
              f.add( fld = new JTextField("Hello World") );
              fld.setEditable( false );
              f.setSize(200, 200);
              f.show();
          }
      }

            Assignee:
            Tim Prinzing (Inactive)
            Reporter:
            Catherine Horton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: