I have a JTable
, and I want to do the following tasks:
- Select a cell
- Select a block of cells
- Select distinct cells
As shown in How to Use Tables: User Selections, JTable
supports multiple selections among rows , but not among individual cells. You may be able to achieve the desired effect using JList
using MULTIPLE_INTERVAL_SELECTION
and HORIZONTAL_WRAP
, as shown here and here.