Skip to content

andrestubbe/FastTheme

Repository files navigation

FastTheme — High-Performance Native Window Styling for Java [v0.3.0]

Modern Windows 10/11 window decorations and dark mode for Java applications.

Build Java Platform License: MIT JitPack

FastTheme brings native Windows styling to Swing and AWT. It enables dark mode title bars, Mica/Acrylic effects, and custom window decorations by bridging Java with the DWM (Desktop Window Manager) API.

Premium Overlay Showcase Premium Overlay Animation


Table of Contents


Key Features

  • 🌙 Native Dark Mode — Proper title bar and border coloring.
  • ✨ Glass Effects — Support for Mica and Acrylic effects (Win 11).
  • 🪟 Premium Overlays — Borderless windows with native shadows and custom drag zones.
  • 🚀 Zero Lag — Direct DWM attribute manipulation via native calls.

Quick Start

// Quick Start — Enabling Premium Overlay Mode
import fasttheme.FastTheme;
import javax.swing.JFrame;

public class Demo {
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        frame.setSize(600, 400);
        
        // Apply Premium Overlay Styling
        long hwnd = FastTheme.getWindowHandle(frame);
        FastTheme.setBorderlessShadow(hwnd, true);
        FastTheme.setOverlayDragHeight(hwnd, 6); // 6px drag zone
        
        frame.setVisible(true);
    }
}

Installation

FastJava modules require two dependencies: the module itself, and FastCore (which handles the native library extraction).

Maven (JitPack)

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fasttheme</artifactId>
        <version>0.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastcore</artifactId>
        <version>0.1.0</version>
    </dependency>
</dependencies>

Gradle (JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fasttheme:0.3.0'
    implementation 'com.github.andrestubbe:fastcore:0.1.0'
}

Option 3: Direct Download (No Build Tool)

Download the latest JARs directly to add them to your classpath:

  1. 📦 fasttheme-v0.3.0.jar (The Core Library)
  2. ⚙️ fastcore-v0.1.0.jar (The Mandatory Native Loader)

Important

Both JARs must be in your classpath for the native JNI calls to function correctly.


Try the Demo

Want to see the high-performance transition engine in action?

  1. Clone this repository: git clone https://github.com/andrestubbe/FastTheme.git
  2. Run the premium showcase: .\run-demo2.bat

Note: The demo showcases the v0.3.0 Borderless Shadow and Drag-Zone logic.


API Reference

Method Description
void setBorderlessShadow(long hwnd, boolean enable) Enables borderless mode with native shadows (Raycast-style).
void setOverlayDragHeight(long hwnd, int pixels) Sets the height of the invisible drag zone.
void setTitleBarDarkMode(long hwnd, boolean enable) Toggles the native system dark mode for the title bar.
void setWindowTransparency(long hwnd, int alpha) Sets native window transparency (0-255).
void setTitleBarColor(long hwnd, int r, int g, int b) Sets a custom native title bar background color.

Platform Support

Platform Status
Windows 10 (1903+) ✅ Dark Mode
Windows 11 ✅ Dark Mode, Mica, Acrylic

License

MIT License — See LICENSE file for details.


Related Projects


Made with ⚡ by Andre Stubbe

About

Native Windows window styling for Java. Titlebar colors, dark mode, transparency via DWM APIs. No Look-and-Feel replacement.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors