61. Name three Component subclasses that support painting.
The Canvas, Frame, Panel,
and Applet classes support painting.
62. What is clipping ?
Clipping is
defined as the process of confining paint operations to a limited area or
shape.
63. What is the difference between a MenuItem and a
CheckboxMenuItem ?
The CheckboxMenuItem class
extends the MenuItem class
and supports a menu item that may be either checked or unchecked.
64. How are the elements of a BorderLayout organized ?
The
elements of a BorderLayout are
organized at the borders (North, South, East, and West) and the center of a
container.
65. How are the elements of a GridBagLayout organized ?
The
elements of a GridBagLayout are
organized according to a grid. The elements are of different sizes and may
occupy more than one row or column of the grid. Thus, the rows and columns may
have different sizes.
66. What is the difference between a Window and a Frame ?
The Frame class
extends the Window class
and defines a main application window that can have a menu bar.
67. What is the relationship between clipping and repainting ?
When
a window is repainted by the AWT painting thread, it sets the clipping regions
to the area of the window that requires repainting.
68. What is the relationship between an event-listener interface
and an event-adapter class ?
An event-listener interface
defines the methods that must be implemented by an event handler for a
particular event. An event adapter provides a default implementation of an
event-listener interface.
69. How can a GUI component handle its own events ?
A
GUI component can handle its own events, by implementing the corresponding
event-listener interface and adding itself as its own event listener.
70. What advantage do Java’s layout managers provide over
traditional windowing systems ?
Java uses layout managers to
lay out components in a consistent manner, across all windowing platforms.
Since layout managers aren’t tied to absolute sizing and positioning, they are
able to accomodate platform-specific differences among windowing systems.
No comments:
Post a Comment