boolean saveIfDirty() {
		try {
			if( textArea.isDirty() )
				textArea.save();
			return true;
		} catch( IOException ex ) {
			JOptionPane.showMessageDialog( this,
				"Failed to save '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(),
				getWindowTitle(), JOptionPane.WARNING_MESSAGE );
			return false;
		}
	}
A pane that supports editing FlatLaf themes.

@author Karl Tauber
flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java