mirror of
https://github.com/Akomry/makeyourownapp-jam.git
synced 2025-12-06 11:43:53 +00:00
initial commit
This commit is contained in:
commit
adc8658d6d
10 changed files with 704 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
package fr.emiko.graphicalapp;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class HelloApplication extends Application {
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
|
||||
stage.setTitle("Hello!");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package fr.emiko.graphicalapp;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
public class HelloController {
|
||||
@FXML
|
||||
private Label welcomeText;
|
||||
|
||||
@FXML
|
||||
protected void onHelloButtonClick() {
|
||||
welcomeText.setText("Welcome to JavaFX Application!");
|
||||
}
|
||||
}
|
||||
8
graphical-app/src/main/java/module-info.java
Normal file
8
graphical-app/src/main/java/module-info.java
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
module fr.emiko.graphicalapp {
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
|
||||
|
||||
opens fr.emiko.graphicalapp to javafx.fxml;
|
||||
exports fr.emiko.graphicalapp;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue