Java jTable changeSelection and then Highlight the new Selected Row
<p>I have a jTable that contains many tickets and I want to give the user the option to find the ticket he is looking for and highlight that the same way that happens when you click on a ticket. </p>

<p>So as it appears in the following picture. Any ideas of how to highlight the ticket that the user selected? Not change the background color, but to make it look the same as if you have pressed on it.</p>

<p><img src="https://i.stack.imgur.com/4i7o6.jpg" alt="process picture"></p>

<pre><code> for (int tableIndex = 0; tableIndex &lt; ticketTable.getRowCount(); tableIndex++) {

            if (ticketTableModel.getValueAt(tableIndex, 0).toString().equals(jTextField1.getText()) || ticketTableModel.getValueAt(tableIndex, 1).toString().equals(jTextField1.getText())) {
                ticketIndex = tableIndex;
                 ticketTable.requestFocus();

                ticketTable.changeSelection(drawIndex, 0, error, error);

                break;
            }

        }
</code></pre>