This commit is contained in:
2023-08-21 12:39:02 -05:00
parent 8b9b520393
commit 6e234d2266
62 changed files with 15370 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,59 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/javafx/FXMain.java to edit this template
*/
package lab1fx;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import style.ButtonStyle;
/**
*
* @author Athanasios V. Markou
*/
public class Lab1FX extends Application
{
@Override
public void start(Stage primaryStage)
{
String style = ButtonStyle.getStyle();
Button btn = new Button();
btn.setStyle(style);
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent event)
{
System.out.println("Hello World!");
}
});
StackPane root = new StackPane();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
launch(args);
}
}