On Thu, 13 Oct 2022 01:48:45 GMT, Toshio Nakamura <tnakam...@openjdk.org> wrote:

> 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

Hi Patrick,

> Can you use stream instead of for loop ? 

Thank you for the comment.
Updated the testcase. I hope this meets your requirements. The remaining 
for-loop is for checking each position of multi selection. I think this case is 
better to use for-loop.

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

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

Reply via email to