`
jslyghj
  • 浏览: 17384 次
  • 性别: Icon_minigender_1
  • 来自: 连云港
社区版块
存档分类
最新评论

JList中右键选中行

 
阅读更多

JList中右键选中行

实现MouseListener的方法

    public void mousePressed(MouseEvent e) {
        if(e.getButton()==3){
            int index=peoplePane.locationToIndex(e.getPoint());
             peoplePane.setSelectedIndex(index);  
        }
    }

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics