Here you can find the source of raiseRect(Graphics2D g2, Rectangle r, Color foreColor)
Parameter | Description |
---|---|
gr | non-null graphic context |
img | non-null image |
r | non-null rectangle |
obs | non-null observer |
public static void raiseRect(Graphics2D g2, Rectangle r, Color foreColor)
//package com.java2s; //License from project: Apache License import java.awt.*; public class Main { /**//from w ww . j a va 2 s. co m * draw an image in a rectangle * * @param gr non-null graphic context * @param img non-null image * @param r non-null rectangle * @param obs non-null observer */ public static void raiseRect(Graphics2D g2, Rectangle r, Color foreColor) { Color oldColor = g2.getColor(); g2.setColor(foreColor); g2.fill3DRect(r.x, r.y, r.width, r.height, true); g2.setColor(oldColor); } }