List of usage examples for java.awt Rectangle getBounds
@Transient
public Rectangle getBounds()
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(100, 100, 200, 200); g2.fill(r);/* ww w .ja v a 2 s . com*/ System.out.println(r.getBounds()); }