I have a jTable that containing some accounts data. I want to disable a button when i click on jTable Row, if the cell text(Data) is "NO" of column number 4 (in code vise column 3). Below is my code, but it does not work.
int selectedRow = tblJournalBatchList.getSelectedRow();
if (tblJournalBatchList.getValueAt(selectedRow, 3) == "NO") {
btnPost.setEnabled(false);
}
What's wrong with my code?