Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm exam 2 review Sp2006: Java, Java, Java, says George

Comments, Questions, Answers, Questions about Answers?
(Back to Midterm Exam 2 Review Sp2006)


A) Thay're LayoutManagers. They differ in the way that they insert elements into a panel (or content pane) and display them. Flow layouts put the elements from left to right, going to a new line when it's out of space. Borderlayouts devide the space into five regions, North, South, West, East and Center, and gives the most space to the Center.

B) Events are things that happen that Java recognizes, like mutton presses, mouse-overs, key presses, etc. Whenever these types of events occur, Java calls it an event. An ActionREMOVEDstener is an interface that the user implements in order to 'hear' and respond to an event occuring.

C) Casting is when you tell Java that one type of object is actually another. It's very useful when calling functions that are inherited from a more generalized class. One example would be that a method in a super class might return an instance of itself. If a child class wants to use that inherited method, the programmer must be aware that Java thinks that the result is an instance of the super class. By casting, you can tell Java that what is returned will actually be an instance of the more specific child class.
~Jim

Does a "mutton press" (B) involve sheep? Mark Guzdial

:D Good ole' veal burgers. I was typing too fast.



Link to this Page