An open API service indexing awesome lists of open source software.

https://github.com/hugoquinn2/fxpopup

FxPopup is a JavaFX library simplifies the creation of automatic forms and popup messages with minimal effort. With just a single line of code, developers can generate dynamic forms or display messages, while maintaining the flexibility to use custom views for both functionalities.
https://github.com/hugoquinn2/fxpopup

frontend javafx javafx-application javafx-components javafx-desktop-apps javafx-gui javafx-library library popup responsive responsive-design

Last synced: about 1 month ago
JSON representation

FxPopup is a JavaFX library simplifies the creation of automatic forms and popup messages with minimal effort. With just a single line of code, developers can generate dynamic forms or display messages, while maintaining the flexibility to use custom views for both functionalities.

Awesome Lists containing this project

README

        


FxPopup



Logo

FxPopup is a `JavaFX` library that simplifies the creation of automatic forms
and popup messages with minimal effort. With just a single line of code, developers
can generate dynamic forms or display messages, while maintaining the flexibility to
use custom views for both functionalities.

## Maven
```xml

io.github.hugoquinn2
fxpopup
1.2.0

```
## Gradle
```groovy
repositories {
mavenCentral()
}

dependencies {
implementation 'io.github.hugoquinn2:fxpopup:1.2.0'
}
```

## Getting started

![Recording 2024-12-28 at 14 47 14](https://github.com/user-attachments/assets/366777a9-c1a2-4587-893e-4d90cd8d37d9)

FxPopup seamlessly injects `XML` code into a JavaFX application to display
notifications to the user. To function correctly, the main container of
the application must be a `StackPane`.
If your root parent is not a `StackPane`, FxPopup will automatically wrap
your root element in a `StackPane` to ensure compatibility.

```java
//Example use lib
FxPopup fxPopup = new FxPopup();
fxPopup.add(/*add custom node to window*/);
fxPopup.show(/*stack custom node to window*/);
```


If you want to display automatic forms, FxPopup requires access to the form's model and validation class.
To achieve this, export the relevant modules to FxPopup at your module-info.java as shown in the following example:

```java
module your.app {
requires fxpopup;

opens your.app.forms to fxpopup;
opens your.app.formsController to fxpopup;
}
```

## Change Theme


FxPopup by default use SYSTEM, but you can force LIGHT &
DARK theme in forms and popup with setTheme(Theme), example:

```java
fxPopup.setGlobalTheme(Theme.DARK); //Theme.LIGHT or Theme.SYSTEM
```