-
How would you set the color of a graphics context called g to cyan?
A) g.setColor(Color.cyan);B) g.setCurrentColor(cyan);C) g.setColor("Color.cyan");D) g.setColor("cyan’);E) g.setColor(new Color(cyan));
-
All Applets are subclasses of Applet.
A) TrueB) False
-
Which of the following methods are defined on the Graphics class:
A) drawLine(int, int, int, int)B) drawImage(Image, int, int, ImageObserver)C) drawString(String, int, int)D) add(Component);E) setVisible(boolean);F) setLayout(Object);
-
An application has a frame that uses a Border layout manager. Why is it probably not a good idea to put a vertical scroll bar at North in the frame?
A) The scroll bar’s height would be its preferred height, which is not likely to be enough.B) The scroll bar’s width would be the entire width of the frame, which would be much wider than necessary.C) Both a and b.D) Neither a nor b. There is no problem with the layout as described.
-
Which of the following classes have a paint( ) method? (Select Multiple)
A) CanvasB) ImageC) FrameD) Graphics
-
What class is the top of the AWT event hierarchy?
A) java.awt.AWTEventB) java.awt.EventC) java.util.eventObjectD) javax.swing.ObjectExplanation: The java.awt.AWTEvent class is the highest-level class in the AWT event class hierarchy.
-
-
What are the features coming with JFC?. (Select Multiple)
A) Pluggable Look-and-FeelB) Accessibility APIC) Java 2D/API(JDK 1.2).D) Drag and Drop Support(JDK 1.2)