I need to implement a search feature into my program. At present it reads from a file one line at a time, like so:
public void importContacts() {
try {
BufferedReader infoReader =
new BufferedReader(new FileReader("../files/Contacts.txt"));
txtName.setText(readLine(infoReader));
txtPhone.setText(readLine(infoReader));
txtMobile.setText(readLine(infoReader));
txtAddress.setText(readLine(infoReader));
How do I get the program to search for a name in within the file and show it in my Jtextfields??
full code here: http://pastebin.com/d12aa3ab3