JTable Mouse Listener Not Working Properly
concurrency, java, jtable, mouselistener, swing
Solution
If you need to handle every click the I suggest you handle `mouseReleased` instead of `mouseClicked`.
Problem
My JTable (jtblLot) Mouse Click Event not Fires some Times. Mainly on frequent Clicks Below is the code for Mouse Click Event ``` private void jtblLot_MouseClicked(java.awt.event.MouseEvent evt) { int row = jtblLot.rowAtPoint(evt.getPoint()), currId = 0; int col = 3; lotId = jtblLot.getValueAt(row, col).toString(); if (jtblLot.getValueAt(row, 1) != null) { sizeGrp_up = jtblLot.getValueAt(row, 1).toString(); } else { sizeGrp_up = "0"; } if (jtblLot.getValueAt(row, 4) != null) { if (jtblLot.getValueAt(row, 4).toString().compareTo("") !=0) { currId = Integer.parseInt(jtblLot.getValueAt(row, 4).toString()) - 1; } } else { sizeGrp_up = "0"; } cmbCurrency.setSelectedIndex(currId); jlblLotId.setText(lotId); // Sets Model For Another JTable(jtblLGP) In My Form Get Data From DB getLotGradePriceData(); //On Click I get The Focus To The Clicked Cell int col_ = jtblLot.columnAtPoint(evt.getPoint()); jtblLot.setCellSelectionEnabled(true); jtblLot.changeSelection(row, col_, false, false); jtblLot.scrollRectToVisible(new Rectangle(jtblLot.getCellRect(row, col_, true))); } ```