15.1 | How do you create a button labeled "OK"? How do you change text on a button? How do you set an icon, pressed icon, and rollover icon in a button? |
15.2 | Given a JButton object jbtOK , write statements to set the button's foreground to red, background to yellow, mnemonic to 'K', tool tip text to "Click OK to proceed", horizontal alignment to RIGHT, vertical alignment to BOTTOM, horizontal text position to LEFT, vertical text position to TOP, and icon text gap to 5. |
15.3 | How do you create a check box? How do you create a check box with the box checked initially? How do you determine whether a check box is selected? |
15.4 | What is wrong if the statement super.actionPerformed(e) in CheckBoxDemo is omitted? |
15.5 | How do you create a radio button? How do you create a radio button with the button selected initially? How do you group the radio buttons together? How do you determine whether a radio button is selected? |
15.6 | How do you create a label named "Address"? How do you change the name on a label? How do you set an icon in a label? |
15.7 | Given a JLabel object jlblMap , write statements to set label's foreground to red, background to yellow, mnemonic to 'K', tool tip text to "Click OK to proceed", horizontal alignment to RIGHT, vertical alignment to BOTTOM, horizontal text position to LEFT, vertical text position to TOP, and icon text gap to 5. |
| |
15.8 | How do you create a text field with ten columns and the default text "Welcome to Java"? How do you write the code to check whether a text field is empty? |
15.9 | How do you create a text area with ten rows and twenty columns? How do you insert three lines into the text area? How do you create a scrollable text area? |
15.10 | How do you create a combo box, add three items to it, and retrieve a selected item? |
15.11 | How do you create a list with an array of strings? |
15.12 | How do you create a horizontal scroll bar? What event can a scroll bar generate? |
15.13 | How do you create a vertical slider? What event can a slider generate? |
15.14 | Explain how to create and show multiple frames in an application. |