Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Java FX MetroUI and Development Library

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

In this issue, Xiaobian will bring you about how to use Java FX MetroUI and development libraries. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.

Metro UI For JavaFX!

This is a Windows design style UI library, very simple to use, as long as a line of code can achieve the overall UI style replacement!

new JMetro(JMetro.Style.LIGHT).applyTheme(scene);

example

Switch

Button

A description of the Jmetro project and how to use it can be found on his blog.

ConsrolsFX

This is a JavaFX control extension library, interface style and JavaFX native consistent, based on JavaFX added many useful controls.

Very powerful and configurable.

Github :

https://github.com/controlsfx/controlsfx

Use of 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; } }); }

Use:

notification("message", "start scanning", "info");

The above is how to use Java FX MetroUI and development libraries shared by Xiaobian for everyone. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report