text.setBorder(new BorderBuilder().line(new Color(25, 25, 25)).empty(2));
return text;
}
private void populateTextAreaFromFile(final JTextComponent text, final File file, final String charset) {
ExceptionHandler<? super Exception> errorHandler = new LoggingExceptionHandler(
editor.getClass(), ErrorLevel.ATTENTION, "Failed to open the file " + file.getName());
TextComponentUtils.loadFile(file, "UTF-8", text, null, errorHandler);
// The loadFile() method installs a new document. We must therefore
// (the undo listener was added to the previous document) reinstall
// the undo/redo mechanism in case the editor was made editable before