Page 1 of 1

1, Which import statements are needed to display the given GUI? Group of answer choices 2, Which XXX completes the given

Posted: Sun May 15, 2022 1:42 pm
by answerhappygod
1, Which import statements are needed to display the given
GUI?
Group of answer choices
2, Which XXX completes the given code to display a message for
invalid input?
Group of answer choices
a, JFrame.showMessageDialog(this, "Scores cannot be less than or
equal to zero");
b, JFrame.showMessageDialog("Scores cannot be less than or equal
to zero");
c, JOptionPane.showMessageDialog("Scores cannot be less than or
equal to zero");
d, JOptionPane.showMessageDialog(this, "Scores cannot be less
than or equal to zero");
3, For the given code, when is numType.setText() called?
Group of answer choices
a, Every time numSpinner's value changes
b, Only the first time numSpinner's value changes
c, Only the first time numSpinner's value or numType's value
changes
d, Every time numSpinner's value or numType's value changes
4, Which method call will make JTextArea object newArea
non-editable?
Group of answer choices
a, newArea.setNonEditable(true);
b, newArea.setEditable(false);
c, newArea.setEdit(false);
d, newArea.getEditable(false);
5, What will be the text displayed in the JTextArea for the
given code?
Group of answer choices
a, Hello!Welcome to Java
b,
Hello!
Welcome to Java
c, Hello! Welcome to Java
d, Welcome to Java
6, What does the constant APPROVE_OPTION of the JFileChooser
class indicate?
Group of answer choices
a, The user selected a file and pressed the "Open" button
b, The file is approved by the system
c, The file permissions are approved by the system
d, The user selected a file
7, Which XXX will place the GUI components in the grid to match
the figure below?
Group of answer choices
8, Given
GridPane myGrid = new GridPane();
, which method calls set the spacing between columns to 10
pixels and rows to 5 pixels?
Group of answer choices