I'm not sure how to answer this question, without something to work with. This is the kind of thing that doesn't have a single answer, "how" depends on the specifics of what components you're working with and especially how you want to design and structure your interface (possibilities are endless...)
I guess you're talking about Responsive Design? Yep you can do this. But there is a little learning curve to get the hang of it.
You can get most (if not all) of this accomplished using Scene Builder. Below is an example I just tossed together quickly which demonstrates a few "tricks". One of my favorite techniques involves VBox/HBox combinations with hgrow and vgrow values on their child containers (I used a basic Pane in the below example to achieve a "spacer" effect).
For the most part though, most JFX components will already attempt to size themselves appropriately. And you usually want to stay as close to that as possible (only override and hardcode stuff when you need to). You don't need to use an AnchorPane as the root, that's just what SceneBuilder defaults to (I rarely use AnchorPane really, often a BorderPane or even a simple HBox/VBox are better.)
If that's not what you meant, there's also this boolean setting on Stage that you might be interested in:
This is just a preview, I actually resized it smaller than the default, but the principle is the same and the components change their spacing for larger window sizes too.
Once you have something more concrete (especially some kind of design or layout at least in mind), you can ask for some more specific (and probably more helpful) suggestions.