https://github.com/valkryst/jiconbutton
A Java Swing component designed to display an Icon on a JButton and to automatically resize it to fit within the button's bounds as it resizes.
https://github.com/valkryst/jiconbutton
button fonticon fonticons icon java jbutton swing swing-gui
Last synced: 10 months ago
JSON representation
A Java Swing component designed to display an Icon on a JButton and to automatically resize it to fit within the button's bounds as it resizes.
- Host: GitHub
- URL: https://github.com/valkryst/jiconbutton
- Owner: Valkryst
- License: apache-2.0
- Created: 2025-05-24T01:18:00.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-09T14:06:25.000Z (12 months ago)
- Last Synced: 2025-07-09T15:24:50.077Z (12 months ago)
- Topics: button, fonticon, fonticons, icon, java, jbutton, swing, swing-gui
- Language: Java
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
`JIconButton` is a Java Swing component designed to display an [Icon](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/Icon.html)
and to automatically resize the Icon to fit within the button's bounds. It can be used with the following subclasses of
the Icon class:
* [FontIcon](https://github.com/kordamp/ikonli/blob/master/core/ikonli-swing/src/main/java/org/kordamp/ikonli/swing/FontIcon.java) from [ikonli](https://github.com/kordamp/ikonli)
* [ImageIcon](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/ImageIcon.html)
## Table of Contents
* [Installation](https://github.com/Valkryst/JIconButton#installation)
* [Gradle](https://github.com/Valkryst/JIconButton#-gradle)
* [Maven](https://github.com/Valkryst/JIconButton#-maven)
* [sbt](https://github.com/Valkryst/JIconButton#-scala-sbt)
## Installation
JIconButton is hosted on the [JitPack package repository](https://jitpack.io/#Valkryst/JIconButton)
which supports Gradle, Maven, and sbt.
###  Gradle
Add JitPack to your `build.gradle` at the end of repositories.
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Add JIconButton as a dependency.
```
dependencies {
implementation 'com.github.Valkryst:JIconButton:2025.5.23'
}
```
###  Maven
Add JitPack as a repository.
``` xml
jitpack.io
https://jitpack.io
```
Add JIconButton as a dependency.
```xml
com.github.Valkryst
JIconButton
2025.5.23
```
###  Scala SBT
Add JitPack as a resolver.
```
resolvers += "jitpack" at "https://jitpack.io"
```
Add JIconButton as a dependency.
```
libraryDependencies += "com.github.Valkryst" % "JIconButton" % "2025.5.23"
```