12.18 Programming Activity 2: Working with Layout Containers

In this Programming Activity, you will complete the implementation of a version of the Tile Puzzle game using a more complex GUI. As it stands now, the application compiles and runs, but it is missing a lot of code. Figure 12.32 shows the window that will open when you run the application without adding your code. Once you have completed the five tasks of this Programming Activity, you should see the window in Figure 12.33 when you run your program and click on the “3-by-3” button. When you click on one of the buttons labeled “3-by-3,” “4-by-4,” or “5-by-5,” the tile puzzle will reset to a grid of that size.

Figure 12.32The Starting Window When Running the Prewritten Code

Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.