Why following code generate error message : getX() has private access in java.awt.Rectangle
(int)dest.getX(), (int)dest.getY(), (int)dest.getWidth(), (int)dest.getHeight()
According to the doc , Rectangle
do have a public method 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;
}
I just tried the following and it compiles fine.