Skip to content

Latest commit

Β 

History

83 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FastTheme 0.1.2 [ALPHA-2026-07-26] β€” High-Performance Native Window Styling for Java

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


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, 96);

        // Remove all Java window decorations (title bar, borders)
        // Required for creating a true overlay-style window
        frame.setUndecorated(true);

        // Center the window on the screen
        frame.setLocationRelativeTo(null);

        // Set the window background to pure black
        // Since the title bar is removed, the content area becomes the visible body
        frame.getContentPane().setBackground(new Color(0, 0, 0));

        // The native HWND is created only after the window becomes visible
        frame.setVisible(true);

        long hwnd = FastTheme.getWindowHandle(frame);
        if (hwnd != 0) {

            // Enables the Windows 11 shadow (DWM + WS_THICKFRAME)
            FastTheme.setBorderlessShadow(hwnd, true);

            // Defines the height of the invisible drag zone at the top
            // Allows the window to be dragged like Raycast/Spotlight
            FastTheme.setOverlayDragHeight(hwnd, 6);

            // Applies semi-transparency to the entire window (0–255)
            FastTheme.setWindowTransparency(hwnd, 230);

        } else {
            System.err.println("❌ HWND is 0 – native window handle not found!");
        }

    }
}


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.

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.1.2</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.1.2'
    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-0.1.2.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.1.2 Borderless Shadow and Drag-Zone logic.


API Reference

Method Description
long getConsoleWindowHandle() Retrieves the native Win32 HWND window handle of the active console.
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.

Documentation

  • REFERENCE.md: Exhaustive catalog of FastTheme native methods, DWM constants, HWND extraction, and JNI contracts.
  • PHILOSOPHY.md: Zero-allocation Win32 DWM bridge architecture, layered attributes, and flicker-free window subclassing.
  • ROADMAP.md: Planned milestone features and OS theme integration.
  • CHANGELOG.md: Version history and release notes.
  • COMPILE.md: Native C++ JNI build instructions and Maven deployment.

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 β€” dark mode title bars, Mica/Acrylic effects, borderless overlays with shadows, drag zones, and full DWM attribute control for modern Windows 10/11 UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages