Your main thread is executed before the file chosen. That's why file name is being printed as null. To see your selected file try to sleep the main thread for 10 seconds. And choose your file. After that you can see the selected file in main. Use:
public static void main(String[] args)
{
FCDemo demo=new FCDemo("filechooser");
try {
Thread.sleep(10000);
} catch (Exception e) {
// TODO: handle exception
}
System.out.println("the file name is= "+demo.get_fileName());
}