Skip to content

Commit

Permalink
Add Sample
Browse files Browse the repository at this point in the history
* add hello gui
  • Loading branch information
brp14005 committed Feb 3, 2016
1 parent 655530d commit 95f5bd5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# IntelliJ
.idea/
*.iml
javafx_scenebuilder_kit_javadoc-2_0.zip
out/
4 changes: 4 additions & 0 deletions src/sample/Controller.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package sample;

public class Controller {
}
23 changes: 23 additions & 0 deletions src/sample/Main.java
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 0 deletions src/sample/sample.fxml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 95f5bd5

Please sign in to comment.