In this chapter, we will take a break from studying JavaFX APIs and look into good practices for using them.
Modern applications are not set in stone and try to adapt to different users' settings, most prominently the size of the application's window. This may change due to a variety of reasons: different devices, rotation, split-screen functionality, or just the user's manual resizing to a comfortable position. This adaptivity, or a dynamic UI, provides a better user experience.
We will review the following practices for building a dynamic UI:
- Tuning min and max size properties
- Controlling node location with AnchorPane
- Planning node size behavior with grow priorities
- Fluid layouts
- Enhancing applications with scrolling