????????????е??????????????е??????????????RectangularDimension?????????????????????????Button??????????

abstract class Component {
boolean isVisible;
int posXInContainer;
int posYInContainer;
...
abstract void paint(Graphics graphics);
}
class RectangularDimension {
int width;
int height;
void setWidth(int newWidth) {
...
}
void setHeight(int newHeight) {
...
}
}
class Button extends Component {
ActionListener listeners[];
RectangularDimension dim;
...
void paint(Graphics graphics) {
...
}
void setWidth(int newWidth) {
dim.setWidth(newWidth);
}
void setHeight(int newHeight) {
dim.setHeight(newHeight);
}
}
class ClockComponent extends Component {
...
void paint(Graphics graphics) {
//????????????????????
}
}


???????

?????????????????????????????????????????????????飺????????????Щ??????????????????????????????????????????????????????????????????????й?????????е??????????????е????????Щ?????????????????????????????????