| getBounds() | ใช้คืนค่า ตำแหน่ง และขนาดความกว้างและความสูง ของ component ในรูปแบบของ rectangle |
|---|
method:getBounds ();
return type:Rectangle
content:ใช้คืนค่า ตำแหน่ง และขนาดความกว้างและความสูง ของ component ในรูปแบบของ rectangle
example:JButton button = new JButton ( "cancel" ); button.setBounds ( 0, 0, 100, 30 ); Rectangle rectangle = button.getBounds ();