Java Reference
In-Depth Information
Review Questions
1.
What does GUI stand for?
2.
What does AWT stand for?
3.
What does Swing stand for?
4.
Which of the following statements is (are) true about lightweight and heavyweight
components? (Select all that apply.)
a. The look and feel of a heavyweight component relies heavily on the native
platform.
b. The look and feel of a lightweight component relies heavily on the native platform.
c. Lightweight components are written entirely in Java, allowing them to control
their appearance.
d. All the AWT components are heavyweight components.
e. All the class names that represent Swing components begin with a capital J.
f. All the Swing components are lightweight components.
5.
What is the initial size of a java.awt.Frame object immediately after one is instantiated?
6.
How big is a JFrame if setBounds(120, 200, 340, 280) is invoked on the JFrame?
7.
Which one of the following statements is not true?
a. The java.awt.Container class is a child of java.awt.Component.
b. The javax.swing.JComponent class is the parent class of all Swing components.
c. All Swing components can act as containers.
d. All AWT components can act as containers.
e. The javax.swing.JComponent class is a child of java.awt.Container.
8.
Which method in the java.awt.Container class is used to add a component to the
container?
9.
What is the default layout manager of a java.awt.Frame?
10.
What is the default layout manager of the content pane of a javax.swing.JFrame?
11.
What is the default layout manager of a java.awt.Panel? Of a javax.swing.JPanel?
12.
Which of the following statements is (are) true about layout managers? (Select all that
apply.)
a. Components with FlowLayout receive their preferred size.
b. Components with BorderLayout receive only their preferred width.
c. Components with GridLayout do not receive their preferred width or height.
Search WWH ::




Custom Search