Java Draw Rectangle drawRect(Rectangle r, Graphics2D g)

Here you can find the source of drawRect(Rectangle r, Graphics2D g)

Description

DrawRect

License

Open Source License

Parameter

Parameter Description
r Rectangle
g Graphics2D

Declaration

public static void drawRect(Rectangle r, Graphics2D g) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Graphics2D;

import java.awt.Rectangle;

public class Main {
    /**//w  w  w . j  av a 2  s  .co m
     * DrawRect
     *
     * @param r Rectangle
     * @param g Graphics2D
     * @see Graphics2D#drawRect(int, int, int, int)
     */
    public static void drawRect(Rectangle r, Graphics2D g) {
        g.drawRect(r.x, r.y, r.width, r.height);
    }
}

Related

  1. drawRect(Graphics g, int left, int top, int width, int height, int lineWidth)
  2. drawRect(Graphics g, int x, int y, int w, int h)
  3. drawRect(Graphics g, int x, int y, int w, int h)
  4. drawRect(Graphics g, Rectangle r)
  5. drawRectOrOval(Graphics2D g, boolean oval, int arc, int x, int y, int width, int height)
  6. drawRectPlot(Graphics2D g, int x, int y, int size)
  7. drawRoundRect(Graphics g, int left, int top, int width, int height, int arcWidth, int arcHeight, int lineWidth)
  8. drawThickRect(Graphics g, int x, int y, int w, int h, int d)