Calling a corresponding API method

Don't forget that instead of CSS setStyle(), you can call a corresponding API method. It's the fastest way (performance-wise) to apply a style from Java code because JavaFX doesn't need to spend additional time to parse CSS and style text and then apply the result using Reflection API calls.

The following two methods do the same thing, but the latter one will work faster:

btn.setStyle("-fx-min-height: 50");
btn.setMinHeight(50);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.223.10