When JEditorPane shown HTML form with multi-selection, the reset operation 
broke its drawing.

There are two issues. The current method 
`OptionListModel.removeIndexInterval()` disabled selections, but it didn't fire 
the change. Then, no re-drawing. Another issue is the method works as remove 
and shift. Then, selection values were corrupted.
I think the clear method `OptionListModel.clearSelection()` is suitable here.

Test: jdk_desktop on macOS (x64, Monterey), Linux (x64, RHEL8), and Windows 
(x64, 2012R2).
      No regression found

-------------

Commit messages:
 - 8295248: JEditorPane HTML form with multi selection broke drawing after 
reseting

Changes: https://git.openjdk.org/jdk/pull/10685/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10685&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295248
  Stats: 157 lines in 2 files changed: 153 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10685.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10685/head:pull/10685

PR: https://git.openjdk.org/jdk/pull/10685

Reply via email to