JavaFX implementation of the GuiInteraction library.
This module provides JavaFX-based dialogs and viewers for user interaction. It offers the richest UI experience with native-looking dialogs, date pickers, and web-based content viewing.
- JDK 21+ with JavaFX support
- Recommended: BellSoft Liberica Full JDK which includes JavaFX
- Native JavaFX dialogs for file/directory selection
- Rich date and year-month pickers with calendar UI
- WebView-based HTML and SVG rendering
- Markdown viewing with full formatting support
- Chart display via Matrix Charts integration
dependencies {
implementation 'se.alipsa.gi:gi-fx:0.3.0'
}<dependency>
<groupId>se.alipsa.gi</groupId>
<artifactId>gi-fx</artifactId>
<version>0.3.0</version>
</dependency>@Grab(group:'se.alipsa.gi', module:'gi-fx', version:'0.3.0')
import se.alipsa.gi.fx.InOut
def io = new InOut()import se.alipsa.gi.fx.InOut
def io = new InOut()
// File selection
def file = io.chooseFile("Open", ".", "Select a file", "txt", "csv")
// User prompts
def name = io.prompt("Enter your name:")
// Display HTML
io.view("<h1>Hello</h1><p>Welcome!</p>", "Greeting")
// Display Markdown
io.viewMarkdown("# Title\n\nSome **bold** text", "Document")A fat JAR (with all dependencies bundled) is available:
dependencies {
implementation 'se.alipsa.gi:gi-fx:0.3.0:fatjar'
}- JavaFX must be available at runtime (either bundled in JDK or added as dependencies)
- Thread safety: UI operations are automatically dispatched to the FX Application Thread
- SVG files are rendered using WebView
See the API Guide for detailed usage examples.
MIT License - see LICENSE