-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add hello gui
- Loading branch information
Showing
4 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package sample; | ||
|
||
public class Controller { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |