JavaFX Metro UI 和 开发库使用简介
作者:C.J 时间:2021-12-11 19:01:39
Metro UI For JavaFX!
这是一个Windows设计风格的UI库,使用非常简单,只要一行代码就可以实现整体UI风格的替换!
new JMetro(JMetro.Style.LIGHT).applyTheme(scene);
例子
Switch
Button
案例:
可以看到,非常的美观!
作者博客 :
https://pixelduke.com/java-javafx-theme-jmetro
可以在他的博客中查看 Jmetro 项目的说明和使用方式。
ConsrolsFX
这是一个JavaFX控件扩展库,界面风格与JavaFX原生一致,在JavaFX的基础上增加了许多实用的控件。
功能十分强大,可配置程度很高。
Github :
https://github.com/controlsfx/controlsfx
Notification 的使用
private void notification(String title, String content, String type) {
Notifications notificationBuilder = Notifications.create()
.title(title)
.text(content)
.position(Pos.BASELINE_RIGHT)
.onAction(e -> System.out.println("Notification clicked on!"));
Platform.runLater(() -> {
switch (type) {
case "error":
notificationBuilder.showError();
break;
case "info":
notificationBuilder.showInformation();
break;
}
});
}
使用:
notification("信息", "开始扫描", "info");
效果:
用 JMetro 开发的界面:
来源:104.116.116.112.58.47.47.97.115.100.50.53.54.57.52.56.52.51.57.50.49.46.104.107.46.109.121.106.115.112.46.119.97.110.103.47.50.48.49.57.47.48.55.47.50.55.47.106.97.118.97.102.120.45.109.101.116.114.111.45.117.105.45.37.69.53.37.57.50.37.56.67.45.37.69.53.37.66.67.37.56.48.37.69.53.37.56.70.37.57.49.37.69.53.37.66.65.37.57.51.47.
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Mybatis实现插入数据后返回主键过程解析
Spring IOC与DI核心重点分析
![](https://img.aspxhome.com/file/2023/4/58604_0s.png)
SpringBoot中如何对actuator进行关闭
![](https://img.aspxhome.com/file/2023/9/62349_0s.png)
Netty实战入门教程之 什么是Netty
![](https://img.aspxhome.com/file/2023/9/78939_0s.png)
Android中SeekBar和RatingBar用法实例分析
JFileChooser实现对选定文件夹内图片自动播放和暂停播放实例代码
关于@Autowired注入依赖失败的问题及解决
![](https://img.aspxhome.com/file/2023/4/60474_0s.png)
详解spring mvc中url-pattern的写法
区块链java代码实现
![](https://img.aspxhome.com/file/2023/9/79179_0s.jpg)
C++实现约瑟夫环的循环单链表
![](https://img.aspxhome.com/file/2023/3/107403_0s.jpg)
jpa多数据源时Hibernate配置自动生成表不生效的解决
![](https://img.aspxhome.com/file/2023/8/79168_0s.jpg)
Java 内置Http Server构建web应用案例详解
![](https://img.aspxhome.com/file/2023/8/69948_0s.png)
JAVA基本概念详解
![](https://img.aspxhome.com/file/2023/6/70996_0s.jpg)
Android实现按钮点击效果
C语言关于时间复杂度详解
![](https://img.aspxhome.com/file/2023/5/122575_0s.jpg)
基于Hadoop实现Knn算法
![](https://img.aspxhome.com/file/2023/8/60048_0s.jpg)