Create an educational program for children that distinguishes between vowels and
consonants as the user clicks buttons. Create 26 JButtons, each labeled with a different
letter of the alphabet. Create a JFrame to hold three JPanels in a two-by-two grid. Randomly
select eight of the 26 JButtons and place four in each of the first two JPanels. Add a JLabel to
the third JPanel. When the user clicks a JButton, the text of the JLabel identifies the button’s
letter as a vowel or consonant, and then a new randomly selected letter replaces the letter
on the JButton. Save the file as JVowelConsonant.java
Comments
Leave a comment