Skip to content

Commit

Permalink
Merge pull request #7 from yoep/feature/#5-resourcebundle-documentation
Browse files Browse the repository at this point in the history
Resolve #5: Added ResourceBundle bean example to the docs
  • Loading branch information
yoep authored Jan 13, 2024
2 parents 08552bd + c328d13 commit f31b1b2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ This is the new major version of the library which requires Spring Boot 3+ and J

Create a class which extends `SpringJavaFXApplication` and launch the JavaFX application from this class.

Example:

_main entry example_
```java
@SpringBootApplication
public class MySpringApplication extends SpringJavaFXApplication {
Expand All @@ -65,6 +64,21 @@ public class MySpringApplication extends SpringJavaFXApplication {
}
```

Create a `ResourceBundle` bean which can be used by JavaFX within `.fxml` files.

_resource bundle example_
```java
@Configuration
public class LanguageConfig {
@Bean
public ResourceBundleMessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasenames("lang/example");
return messageSource;
}
}
```

### Borderless stage

You can create a borderless (undecorated) stage which is still resizable
Expand Down

0 comments on commit f31b1b2

Please sign in to comment.