Here you can find the source of drawShadowedString(String string, int x, int y, Graphics2D g2d)
Parameter | Description |
---|---|
string | the string to be drawn |
x | x position |
y | y position |
g2d | the drawing context |
public static void drawShadowedString(String string, int x, int y, Graphics2D g2d)
//package com.java2s; import java.awt.Color; import java.awt.Graphics2D; public class Main { /**/*from w w w . j a v a 2 s . c om*/ * @param string the string to be drawn * @param x x position * @param y y position * @param g2d the drawing context */ public static void drawShadowedString(String string, int x, int y, Graphics2D g2d) { Color holdColor = g2d.getColor(); g2d.setColor(Color.black); g2d.drawString(string, x + 1, y + 1); g2d.setColor(holdColor); g2d.drawString(string, x, y); } }