Java tutorial
import java.awt.Graphics2D; import java.awt.GraphicsEnvironment; import java.awt.image.BufferedImage; public class Main { public static void main(String[] args) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); BufferedImage bi = new BufferedImage(10, 20, 0); Graphics2D g2 = ge.createGraphics(bi); } }