表格添加双击监听
程序员文章站
2022-06-14 13:37:13
...
jtable.addMouseListener(new MouseAdapter()
{
public void mouseReleased(java.awt.event.MouseEvent e) {
//是否左建双击
if (e.getClickCount() == 2 && SwingUtilities.isLeftMouseButton(e)) {
//添加双击后的代码
}
}
});