The quiz questions are designed to test your knowledge of the material covered in this hour. The answers to the questions follow.
1: | If you have five check boxes on a screen, how many of them can be turned on at one time? |
A1: | All of them. Check boxes are independent of each other, so any combination of check boxes can be on or off. |
2: | If you have five radio buttons on a screen, how many of them can be turned on at one time? |
A2: | Only one radio button in a group can be on at a time. Radio buttons represent a situation where the choice is exclusive. |
3: | If you want the cursor to immediately appear in an input text, what do you need to do? |
A3: | First, set a name for the text field. Then use Selection.setFocus() to place the cursor there. |
4: | How do you prevent the user from entering any non-numbers into a text field? |
A4: | Set its restrict property to “0123456789”. |