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

A stateChanged event needs to be fired when text in JEditorPane is deselected

XMLWordPrintable

    • swing1.1
    • x86
    • windows_nt

      ==========================================================================
      carlos.lucasius@canada 1998-03-27:
      Bug reported by Corel (licensee) for JFC1.1 using JDK1.1.4 on WINNT4.0.
      Corel: "Very critical bug for our product - requires immediate attention."

      If you select text in the JEditorPane and click in the same location as
      the caret, the text is deselected but no event is fired. It would be
      useful for the 'stateChanged' event to also be fired in this case. To
      generate the event I changed the following in DefaultCaret.java:

      On line 508 in the method 'setDot(int dot):

      old code snippet:
       if (this.dot != dot) {
           changeCaretPosition(dot);
       }

      new code snippet:
       if (this.dot != dot || selectionTag != null) {
           changeCaretPosition(dot);
       }

            tprinzing Tim Prinzing (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: