mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Theme Editor: instead of creating empty FlatLightLaf.properties and FlatDarkLaf.properties, add some how-to-use description to those files
This commit is contained in:
@@ -187,8 +187,15 @@ public class FlatThemeFileEditor
|
|||||||
return newPropertiesFile( dir );
|
return newPropertiesFile( dir );
|
||||||
else if( result == 1 ) {
|
else if( result == 1 ) {
|
||||||
try {
|
try {
|
||||||
new File( dir, "FlatLightLaf.properties" ).createNewFile();
|
String content =
|
||||||
new File( dir, "FlatDarkLaf.properties" ).createNewFile();
|
"# To use this in your application, make sure that this properties file\n" +
|
||||||
|
"# is included in your application JAR (e.g. in package `com.myapp.themes`)\n" +
|
||||||
|
"# and invoke `FlatLaf.registerCustomDefaultsSource( \"com.myapp.themes\" );`\n" +
|
||||||
|
"# before setting the look and feel.\n" +
|
||||||
|
"# https://www.formdev.com/flatlaf/how-to-customize/#application_properties\n" +
|
||||||
|
"\n";
|
||||||
|
writeFile( new File( dir, "FlatLightLaf.properties" ), content );
|
||||||
|
writeFile( new File( dir, "FlatDarkLaf.properties" ), content );
|
||||||
return true;
|
return true;
|
||||||
} catch( IOException ex ) {
|
} catch( IOException ex ) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user