I want to apply my popup menu for multiple rows that I select with the mouse.
When I drag the mouse it selects the rows, but when I right click for popup menu it selects only 1 row. As it shows on the picture: from 1 to 2.
I want the popup menu to be able to remove mutiple rows at once.
If it helps, I am implementing: MouseAdapter - the method mousePressed. FocusListener - the method focusGained. ActionListener - the method actionPerformed . ListSelectionModel - that implements the valueChanged method.
Also using a JMenuItem , and DefaultTableModel.
Please help.