Skip to content
Snippets Groups Projects
Commit 2d963671 authored by Kiljala Renne Lauri Olavi's avatar Kiljala Renne Lauri Olavi
Browse files

lisätty fxml kamat

parent 4bb4bf89
No related branches found
No related tags found
No related merge requests found
package fxHarakka;
/**
* @author rennekiljala
* @version 23.1.2025
*/
public class HarakkaController {
// TODO
}
\ No newline at end of file
package fxHarakka;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.fxml.FXMLLoader;
/**
* @author rennekiljala
* @version 23.1.2025
*/
public class HarakkaMain extends Application {
@Override
public void start(Stage primaryStage) {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("HarakkaView.fxml"));
final Pane root = ldr.load();
//final KerhoController kerhoCtrl = (KerhoController) ldr.getController();
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("harakka.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.setTitle("Harakka");
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* @param args Ei käytössä
*/
public static void main(String[] args) {
launch(args);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.BorderPane?>
<BorderPane xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHarakka.HarakkaController">
<!-- TODO Add Nodes -->
</BorderPane>
\ No newline at end of file
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment