import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;// NeedleInHaystack by Zhan Ynagjie
public class NeedleInHaystack { public static void main(String[] args) {
System.out.println("NeedleInHaystack by Zhan Ynagjie");
JFileChooser jfc = new JFileChooser();
    FileNameExtensionFilter filter = new FileNameExtensionFilter("jpg", "gif","txt");
    jfc.setFileFilter(filter);
    int returnCode = jfc.showOpenDialog(null);
    if(returnCode == JFileChooser.APPROVE_OPTION); 
    File f = jfc.getSelectedFile();
       System.out.println("You chose to open this file: " +jfc.getSelectedFile().getName());
       
    String UserInPut= JOptionPane.showInputDialog("Please enter a word in your txt");
    
    try {
     BufferedReader br;
     String aLine;
     br = new BufferedReader(new FileReader(jfc.getSelectedFile()));
      List<String> lines = new ArrayList<String>();

while((aLine = br.readLine()) != null){
lines.add(aLine);
}
 String[] stringArr = lines.toArray(new String[0]);
 for(int i=0 ; i < aLine.length() ; i++){
 
System.out.println(aLine);
 
    
 }
 br.close();
    } catch (Exception e) {
     e.printStackTrace();
    }     
     }}txt 文件如下0. today I don't feel like doing anything
1. I just wanna lay in my bed
2. don't feel like picking up my phone
3. so leave a message at the tone
4. cause today I swear I'm not doing anything
5. uh I'm gonna kick my feet up and stare at the fan
6. turn the t.v. on
7. throw my hand in my pants
8. nobody's gon' tell me I cant, no
9. I'll be loungin' on the couch just chillin' in my snuggie
10. flip to MTV so they can teach me how to Dougie
11. cause in my castle I'm the freakin' man
12. oh
13. yes I said it
14. I said it
15. I said it 'cause I can
上面是我的的code,我已经可以读取txt文件了,但是还有一个要求,就是用JOptionPane 输入一个词, 像 at  就会输出
3:  3. so leave a message at the tone
5:  5. uh I'm gonna kick my feet up and stare at the fan
 这两行来,因为里面有 at 这个词, 大神们看看我的code, 怎么才能实现这个呢。
还有另外一个要求,就是输出的时候要求一起输出有 at 在哪个句子里面的上一句 就像
4- 4. cause today I swear I'm not doing anything    //  上面这一句后面是一个“ - ”
5:  5. uh I'm gonna kick my feet up and stare at the fan
亲们能帮帮我吗