Dear You say that You can open up a dialog box Couldnot close it For closing you will have to write method and implement some of the listeners evnt handling interfaces please do go through JavaDocs of the packages as java.awt.event.*;
You will have to write a corresponding implemnted method for refering the close button in that write a command to hide that dialog box simple
Secondly to read One One line First cover your FileReader Object with BufferedReader object and then invoke methods like readLine();
so easily
javaexams@yahoo.com Manish-India