{
final BufferedImage image = new BufferedImage(150, 50, BufferedImage.TYPE_INT_ARGB);
final Graphics2D g2 = image.createGraphics();
final JButton bt = new JButton("A Button");
bt.setSize(90, 20);
final JRadioButton radio = new JRadioButton("A radio button");
radio.setSize(100, 20);
g2.setColor(Color.darkGray);
bt.paint(g2);
g2.setColor(Color.blue);
g2.setTransform(AffineTransform.getTranslateInstance(20, 20));
radio.paint(g2);
g2.setTransform(AffineTransform.getTranslateInstance(0, 0));
g2.setPaint(Color.green);
g2.setFont(new Font("Serif", Font.PLAIN, 10));
g2.drawString("You are viewing a graphics of JFreeReport on index "
+ event.getState().getCurrentDataItem(), 10, 10);