Java examples for 2D Graphics:Image
get Clickable Img
//package com.java2s; import java.awt.image.BufferedImage; public class Main { public static BufferedImage getClickableImg(BufferedImage spriteSheet, int state) { if (state < 3) return spriteSheet.getSubimage(spriteSheet.getWidth() * state / 3, 0, spriteSheet.getWidth() / 3, spriteSheet.getHeight()); else/*from w w w .ja v a 2 s.com*/ return null; } }