dialog.setTitle("View " + file.getName());
String path = file.getAbsolutePath();
path = path.toLowerCase();
FileTypeVerifier verifier = new FileTypeVerifier();
if (verifier.isText(path)) {
JViewerPanel jviewer = new JViewerPanel();
String text = FileUtils.readFileToString(file);
jviewer.update(text);
dialog.add(jviewer);
} else if (verifier.isRTF(path)) {
RTFEditorKit rtf = new RTFEditorKit();
JEditorPane editor = new JEditorPane();
editor.setEditable(false);