Some summary of JavaFX

Source: Internet
Author: User
Some summary of JavaFX:
1. Scene scenes, layout layouts, control controls are the basic components of JavaFX. Controls can be placed in the layout, the layout can be placed in the layout, or can be placed in the scene, it is important to note that the scene can only be placed in one layout, multiple layouts will only default to identify the last layout. If you add multiple layouts, the page can be displayed intact, but the events you add do not respond.

2, the configuration file in addition to international files, pictures, style files, are added to the external folder, try not to package in the executable jar file, because once packaged in, the program will not be able to change these files. In other words, there is a separate file system Resouce folder and database system. 3, when starting a UI thread, if the background to execute too much logic, then the running time is too long, the interface can not pop up in time, it will cause the UI thread blocked, the program into suspended animation state. The solution to this problem is to use the Runlater method of the platform class provided by JavaFX, which allows you to put the interface code to be displayed after you have finished executing the background logic.

Plateform.runlater
(
New Runnable ()
{
Xxx
}
);

Thread run logic: UI thread >> background logic >>ui thread

Some summary of JavaFX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.