// Create an unshown frame
frame = new Frame();
frame.addNotify();
// Get a graphics region, using the Frame
Image image = frame.createImage(200, 300);
// image size width 200, height 300
g = image.getGraphics();
g.setFont(new Font("Serif", Font.ITALIC, 50));
g.drawString("JSP", 10, 50);