I'm working with Java Netbeans and I've a JTable
which contains many values and I'm doing a search. This is my code - it works well.
private void txtRechEHSKeyReleased(java.awt.event.KeyEvent evt) {
String re=comboSearchByEHS.getSelectedItem().toString();
String sql = "select * from equipement where "+re+" like ? ";
try{
ps = con.prepareStatement(sql);
ps.setString(1, txtRechEHS.getText()+"%");
SearchEHS();
}catch (Exception e){
JOptionPane.showMessageDialog(null,e);
}
}
I want that when it searches and gets the result, that the found row the user is looking for gets colorized. How can I do that?