Swing implementation of the GuiInteraction library.
This module provides Swing-based dialogs and viewers for user interaction. It works with any standard JDK without requiring JavaFX.
- JDK 21+ (any distribution)
- Standard Swing file and directory choosers
- Date and year-month pickers (via LGoodDatePicker)
- HTML viewing via JEditorPane
- Table display with JTable
- Clipboard operations
- Chart display via Matrix Charts integration
dependencies {
implementation 'se.alipsa.gi:gi-swing:0.3.0'
}<dependency>
<groupId>se.alipsa.gi</groupId>
<artifactId>gi-swing</artifactId>
<version>0.3.0</version>
</dependency>@Grab(group:'se.alipsa.gi', module:'gi-swing', version:'0.3.0')
import se.alipsa.gi.swing.InOut
def io = new InOut()import se.alipsa.gi.swing.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 table data
io.view([
["Name", "Age"],
["Alice", 30],
["Bob", 25]
], "Users")A fat JAR (with all dependencies bundled) is available:
dependencies {
implementation 'se.alipsa.gi:gi-swing:0.3.0:fatjar'
}- Look and Feel: Uses system look and feel, which varies by platform
- LGoodDatePicker - Date picker component
- swing-yearmonth-picker - Year-month picker
See the API Guide for detailed usage examples.
MIT License - see LICENSE