I need some help to build a preloader. I have an interface that loads several custom components, one of which contains a lot of dynamically built content. I want to add a preloader while it is loading to display the proportion of loaded content, but I'm not sure how to conceptualize the process. I'm not sure where to place the preloader, or how to physically build the visualization. I'm thinking about adding an HBox to the component that is loading, then attaching a graphic to the HBox and setting the width of the HBox to be a percent of the component that has been generated.
Any help or examples of how to go about the process would be much appreciated.