Exam 15: Advanced Gui Topics

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When you type "A", two ____ key codes are generated: Shift and "a".

(Multiple Choice)
4.8/5
(32)

You use the getModifiers() method with an InputEvent object, and you can assign the return value to a(n) ____ variable.

(Multiple Choice)
4.8/5
(39)

Which of the following statements will set the background color of a button named stop to a color of red?

(Multiple Choice)
4.8/5
(44)

The state of a JCheckBoxMenuItem or JRadioButtonMenuItem can be determined with the ____ method.

(Multiple Choice)
5.0/5
(38)

The parent class for all event objects is named ____, which descends from the Object class.

(Multiple Choice)
4.8/5
(37)

A ____ is placed at the top of a container and contains user options.

(Multiple Choice)
4.8/5
(28)

List and describe the four constructors that can be used when creating a JPanel object.

(Essay)
4.9/5
(40)

When you create a simple scroll pane using the constructor that takes no arguments, horizontal and vertical scroll bars appear only if they are needed.

(True/False)
4.9/5
(43)

Write the code to create a scroll pane named myScroll that will display an image named scenery with a vertical scroll bar always present and a horizontal scroll bar as needed.

(Essay)
4.9/5
(34)

  Using the figure above, write the statement to create a JMenuBar . Next, create the two JMenu s that are part of the JMenuBar , add the three components within the Colors JMenu , and add the two JMenuItem s that are part of the BrightJMenu . Finally, write the statement to add the JMenuBar to the JFrame using the setJMenuBar() method. Using the figure above, write the statement to create a JMenuBar . Next, create the two JMenu s that are part of the JMenuBar , add the three components within the Colors JMenu , and add the two JMenuItem s that are part of the BrightJMenu . Finally, write the statement to add the JMenuBar to the JFrame using the setJMenuBar() method.

(Essay)
4.9/5
(35)

Which of the following is NOT a method of the KeyListener interface?

(Multiple Choice)
4.7/5
(35)

Clicking a component results in a(n) ____.

(Multiple Choice)
4.9/5
(36)

Java automatically converts the add() , remove() , and setLayoutManager() statements to more complete versions that include _____.

(Multiple Choice)
4.9/5
(43)

The following statement produces a dark purple color that has green and blue components, but no red: Color darkPurple = new Color(100, 0, 100);

(True/False)
4.9/5
(29)

Using a FlowLayout object named myLayout , write the statement to set the layout of a content pane to left.

(Short Answer)
4.9/5
(26)

When you place a component on the screen, the vertical position is the x-axis and the horizontal position is the y-axis.

(True/False)
4.8/5
(40)

The parent class of MouseEvent is ____.

(Multiple Choice)
4.8/5
(30)

Write the statement to create a Color object named myGray with red, green, and blue values of 100 each.

(Short Answer)
4.9/5
(37)

The Color class can be used with the setBackground() and setForeground() methods of the ____ class.

(Multiple Choice)
4.8/5
(39)

The CardLayout manager generates a stack of containers, one on top of another.

(True/False)
4.9/5
(36)
Showing 41 - 60 of 66
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)