Change
String getFile = chooser.getName();
to
String getFile = chooser.getSelectedFile().getPath();
The reason you received a Null Pointer exception is
FileReader filegetter = new FileReader(getFile);
returns the name of the file. However getFile only contains the name of the file, not where to get it (path).
So since 'new FileReader(getFile);' can't find the file it returns NULL, hence the NPE.
Using:
getFile = chooser.getSelectedFile().getPath();
returns the fully qualified file with path information.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.