第1个回答 2017-10-25
Methods inherited from class java.awt.Component
public void setSize(Dimension d)
Resizes this component so that it has width d.width
and height d.height.
This method changes layout-related information, and therefore,
invalidates the component hierarchy.
Parameters:
d - the dimension specifying the new size
of this component
public void setSize(int width, int height)
Resizes this component so that it has width width
and height height.
This method changes layout-related information, and therefore,
invalidates the component hierarchy.
Parameters:
width - the new width of this component in pixels
height - the new height of this component in pixels