JList中右键选中行
实现MouseListener的方法
public void mousePressed(MouseEvent e) {
if(e.getButton()==3){
int index=peoplePane.locationToIndex(e.getPoint());
peoplePane.setSelectedIndex(index);
}
}
JList中右键选中行
实现MouseListener的方法
public void mousePressed(MouseEvent e) {
if(e.getButton()==3){
int index=peoplePane.locationToIndex(e.getPoint());
peoplePane.setSelectedIndex(index);
}
}