Files
WS-06-intro-to-javafx/src/main/java/workshop/Controller.java
T

38 lines
1.1 KiB
Java

package workshop;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.Button;
public class Controller {
@FXML private Label titleLabel;
@FXML private Button themeToggle;
private boolean isDark = true;
@FXML
private void buyBasic() {
// TODO: Call showAlert() with a message indicating the user entered the payment gateway
}
@FXML
private void buyPro() {
// TODO: Call showAlert() with a message indicating the user entered the payment gateway
}
@FXML
private void buyEnterprise() {
// TODO: Call showAlert() with a message indicating the user entered the payment gateway
}
@FXML
private void toggleTheme() {
// TODO: Toggle the isDark flag. If dark, switch to style.css and set button text to "Switch to Light Mode"
// TODO: If light, switch to light.css and set button text to "Switch to Dark Mode"
}
private void showAlert(String message) {
// TODO: Create a new Alert of type INFORMATION with the given message and display it
}
}