June 21, 2016

How to Add Double Click Listener to JTable

table.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
        if (evt.getClickCount() == 2) {
                 Point point = evt.getPoint();
                 int row = table.rowAtPoint(point);
        }
    }
});

No comments: