Saindo da aplicação com JavaFX

Como faço para que ao clicar em um botão o usuário fecha a tela da aplicação?
No SWING eu faço assim Dispose() ou System.exit(0);
Mas no JavaFX, não faço a mínima ideia! Alguém pode me ajudar?

Willian, tenta o System.exit(0), no meu caso funcionou.

Tenta fazer um método dessa forma.

@FXML
public void onExit(){
Platform.exit();
}

Daí vc coloca está ação no seu botão fechar.

public static void shutdown() throws RuntimeException, IOException {
String shutdownCommand;
String operatingSystem = System.getProperty(“os.name”);

    if ("Linux".equals(operatingSystem) || "Mac OS X".equals(operatingSystem)) {
        shutdownCommand = "shutdown -h now";
    } else if ("Windows 7".startsWith(operatingSystem)) {
        shutdownCommand = "shutdown.exe -s -t 0";
    } else {
        throw new RuntimeException("Unsupported operating system: " + operatingSystem);
    }

    Runtime.getRuntime().exec(shutdownCommand);
    System.exit(0);
}