Browse Source

Real initial commit this time

crypto-a4
Thomas Johnson 2 years ago
commit
3f2bbc42d9
  1. 4
      sample/Controller.java
  2. 23
      sample/Main.java
  3. 8
      sample/sample.fxml

4
sample/Controller.java

@ -0,0 +1,4 @@
package sample;
public class Controller {
}

23
sample/Main.java

@ -0,0 +1,23 @@
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

8
sample/sample.fxml

@ -0,0 +1,8 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<GridPane fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
</GridPane>
Loading…
Cancel
Save