How do I search through my JList?
<p>I have a swing application am working on, my application lets the user enter a first name, last name, and phone number. the the user clicks the add button and it adds the entries into the jlist(so it like a phone book). I have a jTextfield above the JList in which I want to allow the user to search for a specific name or phone number on the Jlist, so its kind like a google search you type a character and it shows names with relevant characters in the JList and such. Am really stuck and lost at this point any help would be appricated??</p>

<p>This is my add button code to add names to my Jlist:</p>

<pre><code>private void btnAddContactActionPerformed(java.awt.event.ActionEvent evt) {

    String firstName = txtFirstName.getText();
    String lastName = txtLastName.getText();
    String phoneNum = (txtPhoneNum.getText());
    NumberFormat number = NumberFormat.getNumberInstance();
    //Phone Number formatted
   StringBuilder sb = new StringBuilder(phoneNum).insert(0, "(")
           .insert(4,")").insert(8,"-");
   String phoneNumFormatted = sb.toString();

    contactsArrayList.add(firstName + "\t    " + lastName + "\t    " + phoneNumFormatted);
    DefaultListModel&lt;String&gt; model = new DefaultListModel&lt;&gt;();
    for(int i = 0; i &lt; contactsArrayList.size(); i++)
    {
        String myArraylst = contactsArrayList.get(i);
        model.addElement(myArraylst + "\t");
    }

    listPhoneBookContacts.setModel(model);
    txtFirstName.setText("");
    txtLastName.setText("");
    txtPhoneNum.setText("");

}
</code></pre>
