⚡ A retained-mode UI framework for the FastJava ecosystem — per-component baked layers, sequencer-style interaction, and hardware-locked performance.
FastUI is a next-generation UI framework built for maximum speed and zero-copy efficiency. Unlike traditional Java UI frameworks (Swing/AWT) that rasterize vector graphics on every frame, FastUI uses a Retained-Mode Baking Pipeline to achieve multi-thousand FPS performance on modern hardware.
- Key Features
- Why FastUI?
- Performance Metrics
- Quick Start
- Installation
- API Reference
- Documentation
- Platform Support
- License
- Related Projects
- 🖼️ Baked Layers — Components render once into
BufferedImagecaches for near-instant blitting. - 🎛️ Sequencer Logic — Advanced anchored-dragging and high-precision temporal selection cursors.
- 🚫 Zero Allocation — The core render loop creates zero objects, eliminating GC pressure entirely.
- 🌑 Neon-Dark Aesthetic — Professionally curated design language with semi-transparent overlays and rounded capsules.
- ⏱️ Deterministic — Predictable performance and hardware-locked timing via FastDWM integration.
Standard Java UI frameworks were designed for an era of static interfaces. In today's world of high-DPI displays and 144Hz+ monitors, the "Immediate-Mode" rasterization model is a bottleneck. FastUI treats UI components as Persistent Graphical Assets.
- ⚡ High Rasterization Overhead — Rasterizing shapes every frame is CPU intensive. FastUI bakes them once.
- 🚫 Garbage Collector Pressure — Traditional loops allocate thousands of objects. FastUI is allocation-free.
- 🪟 Resizing Flicker — Standard resizing is jittery. FastUI integrates with
FastWindowfor butter-smooth scaling. - 🔁 Lack of VSync Alignment — FastUI is natively synchronized to the display refresh rate.
| Metric | FastUI | Standard Swing | Improvement |
|---|---|---|---|
| Render Time (100 Buttons) | < 0.1 ms | ~4.5 ms | 45× Faster |
| Memory Allocations | 0 per frame | ~120 KB per frame | Zero GC |
| Jitter during Resize | Zero (Sync'd) | High | Liquid Smooth |
// Initialize the UI Root
Container root = new Container();
// Add the Unified Timeline Sequencer
Timeline timeline = new Timeline(
startTime, endTime,
200, 20, Color.BLACK, // Height, Arc, BG
90, trackColor, spanColor, // Range settings
font, tickColor, labelColor
);
root.add(timeline);
// In your VSync-locked render loop
root.render(g2d);Add the JitPack repository and the dependencies to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- FastUI Library -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastUI</artifactId>
<version>0.1.1</version>
</dependency>
<!-- FastCore (Required Native Loader) -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastCore</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:FastUI:0.1.1'
implementation 'com.github.andrestubbe:FastCore:0.1.0'
}Download the latest JARs directly to add them to your classpath:
- 📦 fastui-0.1.1.jar (The Core Library)
- ⚙️ fastcore-0.1.0.jar (The Mandatory Native Loader)
Important
All JARs must be in your classpath for the native JNI calls to function correctly.
| Component | Description |
|---|---|
Timeline |
High-precision temporal selector capsule with daily grid and selection markers. |
TextArea |
Multi-line text display with automatic clipping and rounded backgrounds. |
TextField |
Animated single-line input field with Neon-Dark styling. |
Button |
High-performance interactive trigger with mouse behavior support. |
Image3x3 |
Sliceable asset renderer for perfectly rounded capsules at any size. |
Panel |
General purpose layout container holding multiple child components. |
ClipContainer |
Scrollable/clipping container for list elements and sidebars. |
| Layout | Description |
|---|---|
LinearLayout |
Stateless layout for vertical or horizontal sequential flow alignment. |
SplitLayout |
Resizable split layout between two panels with an interactive divider. |
StackLayout |
Stacks multiple overlay components directly on top of each other. |
NoneLayout |
Absolute positioning layout for custom manual component coordinate placement. |
- COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
- REFERENCE.md: Full API descriptions, border configurations, and codepoint index.
- PHILOSOPHY.md: The engineering rationale for zero-allocation performance.
- ROADMAP.md: Future milestones and planned features.
FastUI is a pure Java library and is natively compatible with any platform supporting Java 17+.
| Platform | Status |
|---|---|
| Windows 10/11 | ✅ Fully Supported |
| Linux | ✅ Fully Supported |
| macOS | ✅ Fully Supported |
MIT License — See LICENSE file for details.
- FastCore — Native Library Loader
- FastWindow — Native Window Engine
- FastTheme — Advanced UI Styling Engine
- FastFileSearch — Instant File Search Engine
Part of the FastJava Ecosystem — Making the JVM faster. ⚡
