Today, you’ll learn how to level up your JavaFX programs by building interactive GUI applications.

<aside> 👾 This lab is individual. As with previous labs, each student should create and commit to their own repository. You’re welcome to work on PA04 with your partner once you finish.

</aside>

📓 Quick Recap

Last week, in Lab 08, we explored the basics of GUIs, Scene Builder, FXML, and JavaFX. While building a GUI is powerful, it lacks functionality without interactivity.

Now, it's time to take your JavaFX skills to the next level and make your programs interactive.

🎯 Goals

  1. Learn what data binding is and how to bind data with JavaFX
  2. Build and understand how event handlers work
  3. Create an interactive JavaFX program

🐭 Whack-a-Mole

Traditionally, Whack-a-Mole is an arcade game where players use a mallet to hit toy moles that pop up from holes. It requires quick reflexes and aims to achieve a high score by hitting as many moles as possible within a time limit. It's a popular game that tests hand-eye coordination and is enjoyed by people of all ages.

We’ll be building a digital version of Whack-a-Mole using JavaFX.

<aside> 🟢 Set up your Lab 10 repository using the GitHub Classroom assignment > here <.

</aside>

🎨 Visual Design

Typical arcade-style Whack-a-Mole games have staggered assortment of holes. For simplicity, we’ll design an interface with a simple grid layout. This should feel familiar as you’ve likely created conceptually similar interfaces before, whether for BattleSalvo, Flood-It, Simon, Wordle, or Spelling Bee.

📐 Sketch It Out