WindowsTaskbar
Windows Taskbar is a java wrapper around the Windows native ITaskBarList3 interface with the help of JNA.
Install / Use
/learn @IcarusCoding/WindowsTaskbarREADME
Windows Taskbar
Windows Taskbar is a java wrapper around the Windows native ITaskBarList3 interface with the help of JNA.
Features
It currently supports the following features:
- Initialization of the COM library
- Creation of ThumbButtons
- Interception of the WM_COMMAND message from the window message loop
- Registration of click handlers which will get notified when a ThumbButton is clicked
- Support for custom icons
- Conversion of .ico files from the classpath or filesystem to native HICON instances
- Updating already existing ThumbButtons
- Java AWT integration
- JavaFX integration
How it looks

Prerequisites
Java 17 is required to use Windows Taskbar.
Getting Started
Adding Taskbar buttons with JavaFX
To use the library with JavaFX one has to retrieve the window handle to the active main window.
Currently one can use any of the following methods to retrieve such a handle after the JavaFX Stage is shown:
final Stage stage = ...;
var handle = WindowHandleFinder.getFromInternalJavaFX(stage);
var handle = WindowHandleFinder.getFromActiveWindow();
Adding Taskbar buttons with Java AWT
To use the library with Java AWT one has to retrieve the window handle to the active main window.
Currently one can use any of the following methods to retrieve such a handle after the AWT Window is shown:
final Component component = ...;
var handle = WindowHandleFinder.getFromInternalAWT(component);
final String windowTitle = ...;
var handle = WindowHandleFinder.findByName(windowTitle);
Using the library
final Icon testIcon = Icon.fromClassPath("test", "test.ico");
IWindowsTaskbar taskbar = TaskbarBuilder.builder()
.setHWnd(WindowHandleFinder.getFromInternalJavaFX(stage))
.autoInit()
.overrideWndProc()
.addButtons(ToolbarButtonListBuilder.builder()
.buttonBuilder()
.setIcon(testIcon)
.setTooltip("Click Me")
.withFlag(TaskbarButtonFlag.ENABLED)
.setOnClicked(evt -> System.out.println("Clicked on button with id " + evt.id()))
.build()
.buttonBuilder()
.setIcon(testIcon)
.setTooltip("Test Tooltip")
.withFlag(TaskbarButtonFlag.ENABLED)
.withFlag(TaskbarButtonFlag.DISMISS_ON_CLICK)
.build()
.build())
.build();
Remarks
A strong reference to an instance of the IWindowsTaskbar is needed, if an override of the standard window message loop of the used GUI library is desired.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
