Skip to content

Instantly share code, notes, and snippets.

@nemo404
nemo404 / Fenetre1.fxml
Last active September 28, 2019 14:43
Opening new Window (Stage) and closing it, in JavaFx using the FXML
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.pland.dc.Fenetre1Controller">
<children>
<Button fx:id="Button1" layoutX="240.0" layoutY="269.0" mnemonicParsing="false" onAction="#new_window" prefHeight="34.0" prefWidth="102.0" text="Ok" />