XIcons is a powerful Java icon library collection that provides Java implementations of multiple popular icon libraries, supporting both Swing and JavaFX UI frameworks.
- 🎨 Multiple Icon Library Support: Includes popular icon libraries such as Fluent, Antd, Carbon, Font Awesome, Ionicons, Material Design, Tabler, and more
- 🖥️ Dual Framework Support: Supports both Swing and JavaFX applications
- Regular Icons
- Filled Icons
- Filled Icons
- Outlined Icons
- Twotone Icons
- Default Icons
- Filled Icons
- Round Icons
- Default Icons
- Regular Icons
- Ionicons 4 Default Icons
- Ionicons 5 Default Icons
- Ionicons 5 Sharp Icons
- Filled Icons
- Outlined Icons
- Round Icons
- Sharp Icons
- Twotone Icons
- Default Icons
- Filled Icons
- Sharp Icons
You need to use the corresponding icon classifier:
all
- All Iconsantd
- Ant Design Iconscarbon
- Carbon Iconsfa
- Font Awesome Iconsfluent
- Fluent Iconsionicons4
- Ionicons 4ionicons5
- Ionicons 5material
- Material Design Iconstabler
- Tabler Icons
Add the following dependencies to your pom.xml
file:
<dependency>
<groupId>cn.enaium.xicons</groupId>
<artifactId>xicons-swing</artifactId>
<version>1.0.0</version>
<classifier>fluent</classifier>
</dependency>
<dependency>
<groupId>cn.enaium.xicons</groupId>
<artifactId>xicons-jfx</artifactId>
<version>1.0.0</version>
<classifier>fluent</classifier>
</dependency>
Add the following dependencies to your build.gradle
file:
implementation 'cn.enaium.xicons:xicons-swing:1.0.0:fluent'
implementation 'cn.enaium.xicons:xicons-jfx:1.0.0:fluent'
Or in Kotlin DSL (build.gradle.kts
):
implementation("cn.enaium.xicons:xicons-swing:1.0.0:fluent")
implementation("cn.enaium.xicons:xicons-jfx:1.0.0:fluent")
XIcons also supports Kotlin Multiplatform projects. You can add the following dependency in your build.gradle.kts
:
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("cn.enaium.xicons:xicons-compose-fluent:1.0.0")
}
}
}
}
import cn.enaium.xicons.swing.icons.FluentIcons;
import javax.swing.*;
// Using Regular icons
JLabel label = new JLabel(FluentIcons.Regular.AnimalDog);
// Using Filled icons
JButton button = new JButton(FluentIcons.Filled.AnimalDog);
import cn.enaium.xicons.jfx.icons.FluentIcons;
import javafx.scene.control.Label;
// Using Regular icons
Label label = new Label("Dog", FluentIcons.Regular.AnimalDog);
// Using Filled icons
Button button = new Button("Dog", FluentIcons.Filled.AnimalDog);
import cn.enaium.xicons.compose.FluentIcons
import cn.enaium.xicons.compose.fluent.AnimalDog
// Using Regular icons
Icon(FluentIcons.Regular.AnimalDog, contentDescription = null)
// Using Filled icons
Icon(FluentIcons.Filled.AnimalDog, contentDescription = null)
Thanks to the following open-source projects for providing icon resources:
⭐ If this project helps you, please give it a star!