{"id":15194183,"url":"https://github.com/dansoftowner/fxtaskbarprogressbar","last_synced_at":"2025-10-27T21:31:33.165Z","repository":{"id":130614804,"uuid":"216102593","full_name":"Dansoftowner/FXTaskbarProgressBar","owner":"Dansoftowner","description":"A library for JavaFX that gives you the ability to show progress on the Windows taskbar.","archived":false,"fork":false,"pushed_at":"2021-08-23T08:46:00.000Z","size":1544,"stargazers_count":85,"open_issues_count":4,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-02-13T16:14:03.702Z","etag":null,"topics":["bridj","java","javafx","native","native-library","taskbar","taskbar-progressbar","windows","windows-10","windows-7"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dansoftowner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-18T20:32:22.000Z","updated_at":"2024-01-18T18:34:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"3870349f-0603-4bcc-923b-2061cd87d17c","html_url":"https://github.com/Dansoftowner/FXTaskbarProgressBar","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FFXTaskbarProgressBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FFXTaskbarProgressBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FFXTaskbarProgressBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FFXTaskbarProgressBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dansoftowner","download_url":"https://codeload.github.com/Dansoftowner/FXTaskbarProgressBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860664,"owners_count":16556016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridj","java","javafx","native","native-library","taskbar","taskbar-progressbar","windows","windows-10","windows-7"],"created_at":"2024-09-27T22:41:11.517Z","updated_at":"2025-10-27T21:31:32.715Z","avatar_url":"https://github.com/Dansoftowner.png","language":"Java","readme":"# ![JavaFXTaskbarProgressbar](images/Logo.png)\n\u003cp align=\"center\"\u003e\u003cb\u003eA clean and easy way to implement this amazing native Windows taskbar-progressbar functionality in javaFX\u003c/b\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://jitpack.io/#Dansoftowner/FXTaskbarProgressBar\"\u003e\u003cimg src=\"https://jitpack.io/v/Dansoftowner/FXTaskbarProgressBar.svg\"\u003e\u003c/a\u003e\n\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/Dansoftowner/Fxtaskbarprogressbar\"\u003e\n\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/dansoftowner/fxtaskbarprogressbar\"\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/Dansoftowner/fxtaskbarprogressbar\"\u003e\n\u003c/p\u003e\n\n## Background\nSince Windows 7 there is a taskbar-progressbar feature in Windows systems\nthat basically means that you can see progress on the program's taskbar icon.\nA good example for this when you copy something using the file explorer:\u003cbr\u003e\n![Taskbar progressbar in windows 7](images/areo-progressbar.jpg) \u003cbr\u003e\nThis is very useful because you don't have to open the window to see the progress!\nThe problem is that javaFX doesn't provide this functionality by default... however you \ncan easily implement it with this library!\n\n## Compatibility\nThis library has support for java 8 and java 11 too.\u003cbr\u003e\n\u003cb\u003eThe 'v11.x' versions are for java11 users and the 'v8.x' versions are for java 8 users.\u003c/b\u003e\n\n### Using with java 11\nIf you use java 11 you have to pass this VM argument: `--add-exports javafx.graphics/com.sun.glass.ui=nativejavafx.taskbar`.\nAlso, you have to mention the `nativejavafx.taskbar` module in your `module-info.java` file:\n```java\nmodule YourModule {\n    ...\n    requires nativejavafx.taskbar;\n}\n```\n\n## How to include it to your project\n\n### Maven example:\n\nAdd JitPack.io to your repositories :\n```xml\n\u003crepositories\u003e\n   \u003crepository\u003e\n     \u003cid\u003ejitpack.io\u003c/id\u003e\n     \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n   \u003c/repository\u003e\n\u003c/repositories\u003e\n```\nAdd the dependency:\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.github.Dansoftowner\u003c/groupId\u003e\n\t\u003cartifactId\u003eFXTaskbarProgressBar\u003c/artifactId\u003e\n\t\u003cversion\u003ev11.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle example\n\nAdd the repository:\n```groovy\nrepositories {\n    //...\n    maven { url 'https://jitpack.io' }\n}\n```\n\nAdd the dependency:\n```groovy\ndependencies {\n    //...\n    implementation 'com.github.Dansoftowner:FXTaskbarProgressBar:v11.4'\n}\n```\n\n## Projects using `FXTaskbarProgressBar`\nIf this library is used by your project, let me know in the `Discussions` and I will mention that in this section.\n\n[Boomega](https://github.com/Dansoftowner/Boomega) - A modern book explorer \u0026 catalog application\n\n## How to use it Tutorial\n\n### 0. Types of progressbar\nBefore we jump in, we have to know the 4 types of a taskbar-progressbar:\u003cbr\u003e\n* `NORMAL` - a progressbar with normal green color\n* `PAUSED` - a progressbar with a yellow color\n* `ERROR`  - a progressbar with a red color \n* `INDETERMINATE` - a progressbar that doesn't show any fix progress\n* `NO_PROGRESS` - a progressbar that doesn't show anything \n\u003cbr\u003e\u003cbr\u003e\nAll these types are represented by the enum called `com.nativejavafx.taskbar.TaskbarProgressbar.Type`.\n\nNow let's see how can we actually use this through code.\u003cbr\u003e\nThere are multiple ways to create taskbar progressbars with this library:\n\n#### 1.Through static methods:\nFirstly you have to import the necessary class:\n```java\nimport com.nativejavafx.taskbar.TaskbarProgressbar; \n```\n...and you have to show the javafx Stage before any operation:\n```\nprimaryStage.show();\n``` \nThen call the static method:\n```java\nTaskbarProgressbar.showCustomProgress(primaryStage, 0.5, TaskbarProgressbar.Type.NORMAL);\n```\n\nWell, the code above looks okay, but it's not safe. This functionality isn't supported by every OS. \nFor example on a Linux system it will definitely throw an `UnsupportedSystemException` because it's only available on \u003cb\u003eWindows 7+\u003c/b\u003e\nsystems.\u003cbr\u003e \n\u003cb\u003eIf you use static methods to create taskbar-progressbars you always have to check that the current OS \nsupports this functionality!\u003c/b\u003e \n\nSo let's correct the code:\n```java\nif (TaskbarProgressbar.isSupported()) {\n    TaskbarProgressbar.showCustomProgress(primaryStage, 0.5, TaskbarProgressbar.Type.NORMAL);\n}\n```\n...now it is safe!\n\n\u003cb\u003eResult:\u003c/b\u003e\u003cbr\u003e\n![Normal Taskbar progressbar](images/normal-progress.jpg)\n\nYou have to do a similar thing if you want to show an indeterminate progress:\n```java\nif (TaskbarProgressbar.isSupported()) {\n    TaskbarProgressbar.showIndeterminateProgress(primaryStage);\n}\n```\n\u003cb\u003eResult:\u003c/b\u003e\u003cbr\u003e\n![Indeterminate Taskbar progressbar](images/indeterminate.gif)\n\nTo stop the progress:\n```java\nTaskbarProgressbar.stopProgress(primaryStage);\n```\n#### 2. Through instantiation *(the recommended way)*\nFirstly (after you imported the necessary class) create a `TaskbarProgressbar` instance with the help of\n`TaskbarProgressbarFactory`:\n```java\nTaskbarProgressbar progressbar = TaskbarProgressbarFactory.getTaskbarProgressbar(primaryStage);\n```\nBefore any operation you have to show the Stage:\n```java\nprimaryStage.show();\n```\nAfter that just use the created instance for the operations:\n```java\nprogressbar.showCustomProgress(0.5, TaskbarProgressbar.Type.NORMAL);\n```\n\u003cb\u003e\u003ci\u003eNote: in this case to check that the OS supports this functionality is unnecessary\nbecause the object checks it automatically!\u003c/i\u003e\u003c/b\u003e\n\nThe result is the same:\u003cbr\u003e\n![Normal Taskbar progressbar](images/normal-progress.jpg)\n\nIf you want an indeterminate process:\n```java\nprogressbar.showIndeterminateProgress();\n```\nTo stop the progress:\n```java\nprogressbar.stopProgress();\n```\n\n#### Bonus features\n\nA simple method for showing a fully loaded error progressbar\n```java\nprogressbar.showFullErrorProgress();\n//equivalent to progressbar.showCustomProgress(100, 100, TaskbarProgressbar.Type.ERROR) \n```\n\u003cb\u003eResult:\u003c/b\u003e\u003cbr\u003e\n![Full errror taskbar progress](images/full-error-progress.jpg)\n\n\u003ci\u003eAlso:\u003c/i\u003e\n```java\nprogressbar.showFullNormalProgress();\n```\n\n```java\nprogressbar.showFullPausedProgress();\n```\n\n## More screenshots\nSome more screenshots about what can you do with this library\n* A paused progress example:\u003cbr\u003e\nCode: `progressbar.showCustomProgress(0.7, TaskbarProgressbar.Type.PAUSED);`\u003cbr\u003e\n![Paused progress](images/paused-progress.jpg)\n* An error progress example:\u003cbr\u003e\nCode: `progressbar.showCustomProgress(0.4, TaskbarProgressbar.Type.ERROR);`\u003cbr\u003e\n![Paused progress](images/error-progress.jpg)\n\n## Full demo\nA full demo-example class is available [here](src/test/java/Demo.java).\n\n## Source code\nThis project has two important branches:\n* \"master\" - for java 8 builds\n* \"11\" - for java 11 builds\n\n## Used libraries\n * [bridj](https://github.com/nativelibs4java/BridJ) - blazing fast Java / C / C++ interop\n * [SLF4J](http://www.slf4j.org/) - Simple Logging Facade for Java\n * [Jetbrains Annotations](https://github.com/JetBrains/java-annotations) - Annotations for JVM-based languages\n\n## Support\nIf you like this library give it a star!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdansoftowner%2Ffxtaskbarprogressbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdansoftowner%2Ffxtaskbarprogressbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdansoftowner%2Ffxtaskbarprogressbar/lists"}