
934 CHAPTER 12 Graphical User Interfaces
EXERCISES,PROBLEMS, AND PROJECTS
or the correct number. Let the user continue guessing until he or she
guesses the correct number.
58. Write a program that displays a 5-by-5 grid of buttons, each with a
different button label. When the user clicks on a button, its text is
changed to “Visible”.
59. Write a program that displays a 4-by-6 grid of buttons, each with
some unique text. One button is the “winning” button, which your
program determines randomly, inside the constructor. When the user
clicks on a button, its text is changed to “No” if the button clicked is
not the winning button, or to “Won” if the button ...