import java.io.FileNotFoundException;
import java.util.Scanner;
import javax.swing.JFileChooser;
public class DisplayLabel{
public static void main(String[] args) throws Exception {
JFileChooser fc=new JFileChooser();
if(fc.showOpenDialog(null)==fc.APPROVE_OPTION){
java.io.File file=fc.getSelectedFile();
Scanner input=new Scanner(file);
while(input.hasNext()){
System.out.println(input.nextLine());
}
input.close();
}
else{
System.out.print("NO File setected");
}
}
}