DelayedInit or OnCreate, any solution?

Yes, you are right.
I can also add:
If I had something similar to kotlin receiver function
I would never use DeleayInt. I think construction like

new JFXApp.PrimaryStage {
...
}

Is not very good for that purpose.

But now I am not ready to write JFXApp dsl in scala3.
DeleayInt is absent
Receiver function is absent.

So may be better to use simple java library. It always work at least :wink: