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);
editor.setEditorKit(rtf);
JScrollPane scroller = new JScrollPane();
scroller.getViewport().add(editor);
dialog.add(scroller);
try {
FileInputStream fi = new FileInputStream(file);
rtf.read(fi, editor.getDocument(), 0);
} catch (Exception exception) {
exception.printStackTrace();
}
} else if (verifier.isPicture(path)) {
AlphalinePanel viewer = new AlphalinePanel();