为什么以下代码会生成错误消息:getX() has private access in java.awt.Rectangle
(int)dest.getX(), (int)dest.getY(), (int)dest.getWidth(), (int)dest.getHeight()
根据文档,Rectangle
确实有一个公共方法getX()
。
public boolean setSize(java.awt.Rectangle source, java.awt.Rectangle dest)
{
setVideoSize((int)source.getX() ,(int)source.getY(), (int)source.getWidth(), (int)source.getHeight(),
(int)dest.getX(), (int)dest.getY(), (int)dest.getWidth(), (int)dest.getHeight()
);
return true;
}