Programming Activities on Lesson 4: (Simple Graphics Context and Custom Painting)
I. State whether each of the following is true or false. If false, explain why. Google
Form Link will be provided.
True 1. The drawPolyline method automatically connects the endpoints of the
polygon.
True 2. The drawLine method draws a line between two points.
True 3. The fillArc method uses radians to specify the angle.
True 4. In the Java coordinate system, y values increase from top to bottom.
True 5. The Graphics class is an abstract class and inherits directly from class
Object.
Summative Test:
___B__1. Listener and handlers are defined in what package?
___C__2. Layout Managers are defined in what package?
___A__3. JMenu menuList = new JMenu(“File”);
menuList are defined in what package?
___B__4. ListSelectionListener for JList are defined in what package?
___Z__5. JPanel are examples of what type of GUI elements?
__CC__6. A GUI container that is used to partition the different components.
Event 7. A part in GUI coding where this occurs when a user takes an action on a
component
__F__8. Every answer #7 is responded by these two portions.
__Y__9. – do –
__X__10. A layout manager where class places components sequentially in a row in
the order they are added.
__P__11. A layout manager where it uses five areas to hold the different components
__V__12. A layout manager that arranges into its number of rows and columns
_AA__13. [Link] (new BorderLayout (3,2)); 3 refers to?
__L__14. A layout manager where the components are repositioned once you resize
the GUI.
__G__15. In GUI, this is applied to arrange its components.
__S__16. [Link] (new GridLayout (5,4)); 4 refers to?
__W_17. In using BorderLayout, what is the setting of the component if you will display
it at the bottom.
__K__18. Used this method in attaching the menu bar in the frame.
__M__19. It is an alternative user-interface model, that lets an application display only
one main window at a time
JInternalFrame 20. In Swing, these are objects that acts as child windows held inside a special
container
__DD__21. In the constructor of JInternalFrame(“Internal Frame”, true, true, true, false)
[Link].Graphics22. Graphics context and custom painting are defined in what package?
drawLine 23. The ______ method draws a line between two points.
__U__24. [Link] (new GridLayout (5,4,3,2)); 2 refers to?
__BB_25. In the constructor of JInternalFrame(“Hello”, true, true, true, false)
The "Hello" in this example illustrates that___ is hidden.