| new Point() | ใช้สร้าง object point และเก็บค่าตำแหน่งแกน x, y ที่ 0, 0 |
|---|---|
| new Point( x, y ) | ใช้สร้าง object point และเก็บค่าตำแหน่งแกน x, y ตามที่กำหนด |
| getX() | ใช้คืนค่าตำแหน่งแกน x |
| getY() | ใช้คืนค่าตำแหน่งแกน y |
| x | ใช้คืนค่า แกน x |
| y | ใช้คืนค่า แกน y |
method:new Point ();
return type:Point
content:ใช้สร้าง object point และเก็บค่าตำแหน่งแกน x, y ที่ 0, 0
example:Point point = new Point ();
method:new Point ( x, y );
return type:Point
content:ใช้สร้าง object point และเก็บค่าตำแหน่งแกน x, y ตามที่กำหนด
example:Point point = new Point ( 30, 30 );
method:getX ();
return type:double
content:ใช้คืนค่าตำแหน่งแกน x
example:Point point = new Point ( 30, 30 ); double screen_x = point.getX ();
method:getY ();
return type:double
content:ใช้คืนค่าตำแหน่งแกน y
example:Point point = new Point ( 30, 30 ); double screen_y = point.getY ();
property:x;
return type:double
content:ใช้คืนค่า แกน x
example:Point point = new Point ( 10, 10 ); double screen_x = point.x;
property:y;
return type:double
content:ใช้คืนค่า แกน y
example:Point point = new Point ( 10, 10 ); double screen_y = point.y;