Initial commit
This commit is contained in:
14
src/main/java/tech/nevets/jaml/jaml/Controller.java
Normal file
14
src/main/java/tech/nevets/jaml/jaml/Controller.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package tech.nevets.jaml.jaml;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
public class Controller {
|
||||
@FXML
|
||||
private Label welcomeText;
|
||||
|
||||
@FXML
|
||||
protected void onHelloButtonClick() {
|
||||
welcomeText.setText("Welcome to JavaFX Application!");
|
||||
}
|
||||
}
|
||||
23
src/main/java/tech/nevets/jaml/jaml/JAML.java
Normal file
23
src/main/java/tech/nevets/jaml/jaml/JAML.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package tech.nevets.jaml.jaml;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class JAML extends Application {
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(JAML.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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user