Java examples for 2D Graphics:Text
draw Missing Texture
//package com.java2s; import java.awt.Color; import java.awt.Graphics; public class Main { public static void drawMissingTexture(Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); g.setColor(Color.PINK);// www.jav a 2 s. c o m g.fillRect(x, y, width / 2, height / 2); g.fillRect(x + (width / 2), y + (height / 2), width / 2, height / 2); g.setColor(Color.BLACK); g.fillRect(x + (width / 2), y, width / 2, height / 2); g.fillRect(x, y + (height / 2), width / 2, height / 2); g.setColor(oldColor); } }