List of usage examples for java.awt Rectangle Rectangle
public Rectangle(int x, int y, int width, int height)
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(10, 10, 50, 40); r.translate(20, 20);// w ww . jav a 2 s .co m g2.fill(r); }
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);/* w ww . j a v a2 s. co m*/ System.out.println(r.width); }
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);//from w w w .ja v a 2 s.c o m System.out.println(r.toString()); }
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);//from www . j av a 2 s . co m System.out.println(r.y); }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(10, 10, 50, 40); r.setBounds(20, 20, 40, 40);//from w ww.j a va2 s . co m g2.fill(r); }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(10, 10, 50, 40); r.setRect(20, 20, 40, 40);/*from w ww .j a v a 2 s.c o m*/ g2.fill(r); }
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);//from w w w. jav a2s . c o m System.out.println(r.x); }
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);/*from w w w . jav a2s. co m*/ System.out.println(r.getLocation()); }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(10, 10, 50, 40); r.setBounds(new Rectangle(20, 20, 40, 40)); g2.fill(r);/*from w w w .j ava 2s. c om*/ }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle r = new Rectangle(10, 10, 50, 40); System.out.println(r.outcode(40D, 40D)); g2.fill(r);/*from w w w .j a v a 2 s .co m*/ }