diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java index 99387bb2..b201452f 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java @@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets; import javax.swing.JPanel; import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory; import org.fife.ui.rsyntaxtextarea.FileLocation; +import org.fife.ui.rsyntaxtextarea.Theme; import org.fife.ui.rsyntaxtextarea.TokenMakerFactory; import org.fife.ui.rtextarea.RTextScrollPane; import com.formdev.flatlaf.util.UIScale; @@ -51,6 +52,14 @@ class FlatThemeEditorPane textArea = new FlatSyntaxTextArea(); textArea.setSyntaxEditingStyle( FLATLAF_STYLE ); + // theme + try { + Theme theme = Theme.load( getClass().getResourceAsStream( "light.xml" ) ); + theme.apply( textArea ); + } catch( IOException ex ) { + ex.printStackTrace(); + } + // create scroll pane scrollPane = new RTextScrollPane( textArea ); scrollPane.setLineNumbersEnabled( true ); diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml new file mode 100644 index 00000000..9b566345 --- /dev/null +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +