Initialize WS-06-intro-to-javafx with empty exercise template

This commit is contained in:
MobinAbedian
2026-05-16 15:49:09 +03:30
commit 9d4ecd0b0d
12 changed files with 421 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
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
}
}
+17
View File
@@ -0,0 +1,17 @@
package workshop;
import javafx.application.Application;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage stage) throws Exception {
// TODO: Load the FXML file using FXMLLoader.load() and get the Parent root
// TODO: Create a Scene with the root (width=750, height=450) and add the stylesheet "/style.css"
// TODO: Set the stage title to "Pricing Plans", set the scene, and call stage.show()
}
public static void main(String[] args) {
// TODO: Launch the JavaFX application by calling launch()
}
}