[]
Use this class to store or pass width and height measurements together. Both dimensions are represented as double values and can be accessed through getWidth(), getHeight(), setWidth(double), and setHeight(double).
Size size = new Size(120.0, 80.0);
double width = size.getWidth();
double height = size.getHeight();
Size class with the specified width and height.Use this constructor to create a two-dimensional size whose dimensions can be accessed through getWidth() and getHeight().
width - The width of the size.height - The height of the size.Use this method to retrieve the width component of a Size instance.
Size size = new Size(120.0, 80.0);
double width = size.getWidth();
Use this method to update the width component of a Size instance.
Size size = new Size(120.0, 80.0);
size.setWidth(100.0);
value - The width of this size.Use this method to retrieve the height component of a Size instance.
Size size = new Size(120.0, 80.0);
double height = size.getHeight();
Use this method to update the height component of a Size instance.
Size size = new Size(120.0, 80.0);
size.setHeight(100.0);
value - The height of this size.