Quote Originariamente inviata da Mitele Visualizza il messaggio
Dunque dovrei aggiungere con swing due pulsanti. Ho scritto il codice appropriato ma viene mostrato soltanto un pulsante.
Ok ... ho capito: stai usando JavaFX (e non centra niente Swing!). Dalla documentazione di StackPane:

StackPane lays out its children in a back-to-front stack.
The z-order of the children is defined by the order of the children list with the 0th child being the bottom and last child on top.


In pratica mette i componenti in "stack" uno sovrapposto all'altro. Quindi, scusa, cosa ti aspettavi di diverso?