1.Write an application that extends JFrame and that displays a phrase in every font size from 6 through 20. Save the file as JFontSizes.java
2. A.) Write an application that extends JFrame and that displays a phrase in one color the first time the user clicks a JButton. The next time the user clicks the JButton. The next time the user clicks a JButton, make the first phrase seem to disappear. (Hint: Redraw it using the background color.) At the same time, draw the phrase again in a different color, size, and horizontal position. The third click should change the color, size, and position of the phrase again. Save the file as JChangeSizeAndColor.java
B.) Modify the JChangeSizeAndColor application so that it continuously changes the size, color, and location of a phrase as long as the user continues to click the button. Save the application as JChangeSizeAndColor2.java
******For each JApple you create in the following exercises, create an HTML host document named Test plus the JApplet name. For example, the host document for the JRiddle.java file is a named TestJRiddle.html*****
1.Create a JApplet with a JLabel that contains a riddle and a JButton. When the user clicks the button, display the answer in a large font on another JLabel . Save the file as JRiddle.java
Q: Poor people have it. Rich people need it. If you eat it you die. What is it?
2. A.) Create a JApplet that asks a user to enter a password into a JTextField and to then press Enter. Compare the password to Rosebud; if it matches exactly, display Access Granted. If not, display Access Denied. Save the file as JPasswordA.java
B.) Modify the password applet in Exercise 2a to ignore differences in case between the typed password and Rosebud. Save the file as JPasswordB.java
C.) Modify the password applet in Exercise 2b to compare the password to a list of five valid passwords: Rosebud, Redrum, Jason, Surrender, or Dorothy. Save the file as JPasswordC.java
- This solution has not purchased yet.
- Submitted On 27 Jun, 2015 11:11:37