Skip to content

Commit

Permalink
Feat: DonationPageController
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 13, 2026
1 parent dcded4b commit 27a25f6
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package ntnu.systemutvikling.team6.controller;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.FlowPane;
import javafx.stage.Stage;
import ntnu.systemutvikling.team6.HmHApplication;
import ntnu.systemutvikling.team6.models.Charity;

import javax.swing.text.html.ImageView;
import java.io.IOException;

public class DonationPageController {
@FXML
private FlowPane charityPage;

@FXML
private ImageView logoImage;

@FXML
public void initialize() {
}

@FXML
public void setCharity(Charity charity) {

}

public void switchToFrontPage(ActionEvent event) {
try {
FXMLLoader fxmlLoader =
new FXMLLoader(HmHApplication.class.getResource("/fxml/frontPage.fxml"));
Parent root = fxmlLoader.load();

Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setFullScreen(true);
stage.show();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}

0 comments on commit 27a25f6

Please sign in to comment.