Assume that nameJTextField is a JTextField and that otherJCheckBox is a JCheckBox next to which is a JTextField otherJTextField. What does this code segment do?
```
1 String name = nameJTextField.getText();
2 String other = otherJTextField.getText();
3
4 if ( name.equals( "" ) ||
5 ( otherJCheckBox.isSelected() && other.equals( "" ) ) )
6 {
7 JOptionPane.showMessageDialog( null,
8 "Mystery Message", "Input Error",
9 JOptionPane.WARNING_MESSAGE )
10 }
```
This segment displays a JOptionPane if either there is no text entered in the name- JTextField, or both otherJCheckBox is selected and there is no text entered in otherJTex- tField.
You might also like to view...
The file into which you insert an object is called the ________ file
A) source B) destination C) object D) linked
Which of these is the process that allows access of a specific resource to a specific account?
a. Authentication b. Authorization c. Logging in d. Identification