According to the JavaFX documentation, a child stage is defined by
A stage will always be on top of its parent window.
The issue is I'd like to render them like normal windows according to each other (if you click on one, it will render above the other). Can I do this without a hacky workaround?
The only other functionality you get from making a stage a child of another stage is that the child stage is automatically closed when the parent stage is closed. You can emulate this with a listener:
Stage firstStage = ... ;
Stage secondStage = new Stage();
// secondStage.initOwner(firstStage);
firstStage.addEventHandler(WindowEvent.WINDOW_HIDDEN, evt -> secondStage.hide());
// ...
If you are relying on using getOwner()
anywhere you would have to find a way around that.
(I'm not sure if this qualifies as a "hacky workaround", but it should work...).