Select Multiple Items In JList Without Using The Ctrl/Command Key

前端 未结 4 1313
温柔的废话
温柔的废话 2021-02-08 10:01

I am looking for a way to select multiple items within a JList by just clicking each item.

The normal way to do this is to hold the command/ctrl key and then click.

4条回答
  •  长发绾君心
    2021-02-08 10:50

    For that you'd normally use a checkbox group of JCheckBox items.

    Users are already used with the fact that they need to press CTRL to select multiple items in a listbox. You should not change the default experience/expectation.

提交回复
热议问题