Home > Java > javaTutorial > body text

What is javafx used for?

(*-*)浩
Release: 2019-08-21 11:52:07
Original
5611 people have browsed it

Compared with Java's performance on the server and web, the desktop has always been Java's weakness, so Sun launched JavaFX in 2008 to make up for the shortcomings of desktop software, but the effect was unsatisfactory.

What is javafx used for?

JavaFX is mainly dedicated to rich client development to make up for the shortcomings of swing. It mainly provides graphics libraries and media libraries, supporting audio, video, graphic, animation, 3D, etc., while using modern CSS methods to support interface design. At the same time, XUI method is used to design the UI interface in XML method to achieve the separation of display and logic. It is indeed somewhat similar to Android in this regard. (Recommended learning: Java video tutorial)

New features of JavaFx8

New modern theme: Modena

The new Modena theme replaces the original Caspian theme. However, in the start() method of Application, you can continue to use the Caspian theme through setUserAgentStylesheet(STYLESHEET_CASPIAN).

JavaFX 3D

provides 3D image processing API in JavaFX8, including Shape3D (Box, Cylinder, MeshView, Sphere subclass), SubScene, Material, PickResult, LightBase (AmbientLight and PointLight subclasses), SceneAntialiasing, etc. The Camera class has also been updated. More information can be found in the JavaDoc.

Rich text

Strengthened rich text support

Date controlDatePicker

Public API for CSS structures

CSS styling is a major feature of JavaFX

CSS has been specifically implemented in a private API (com.sun.javafx.css package )

Multiple tools (such as Scene Builder) require the CSS public API

Developers will be able to define custom CSS styles

JavaFX Scene Builder 2.0

Visual tool to accelerate the development of JavaFX graphical interface. JavaFX Scene Builder is like NetBeans. It configures the interface through drag and drop. After the interface is completed, it is saved as an FXML format file. This file describes the object configuration in XML. It is then handed over to the JavaFX program for processing, thus reducing the difficulty of writing the interface directly in JavaFX. JavaFX Scene Builder 2.0 adds a new JavaFX Theme preview function. Menu "Preview" → "JavaFX Theme" to select different themes.

Summary

Compared with AWT and SWING, The advantages of JavaFX are obvious. All major mainstream IDEs already support the development of JavaFX. The best tool is NetBeans. With the benefits brought by lambda, JavaFX's event processing has become much simpler. Whether JavaFX can perform well depends on Dear everyone, as long as we use JavaFX more, JavaFX will become better and better, and this is true for any language, THE END.

For more Java-related technical articles, please visit Java Development Tutorialcolumn for learning!

The above is the detailed content of What is javafx used for?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!