Aug. 28, 2002
The frame class inherits the method
setSize(int width, int height)
from the Component class which can be used to change the size of
the Frame. Use this method to change the size of myFrame to a width
of 100 and a height of 200.
The Frame class inherits the method
setVisible(boolean b) from the
Component class which allows us to make the Frame visible or not depending
on whether we set
false. Use this method
to make myFrame visible.
Look up the method
setLocation and use this method to move the Frame
on the screen to position (10,20).
g. How would you draw a line that starts at point (10,20) and ends at point (50,60) in the graphics object?