public static void main(final String[] args) {
    setPen();
    shape = createShape();
    jFrame = new JFrame();
    bgs[0] = jFrame.getBackground();
    jFrame.add(new JComponent() {

      private static final long serialVersionUID = 2257038010168418793L;

      @Override
      protected void paintComponent(final Graphics gfx) {
        final Graphics2D g = (Graphics2D) gfx.create();
        g.setColor(bgs[curBg]);
        final Dimension dim = jFrame.getSize();
        g.fill(new Rectangle2D.Double(0, 0, dim.getWidth(), dim
            .getHeight()));
        g.setColor(Color.BLACK);
        final Drawable drawable = shapeDrawer.getDrawable(shape);
        drawable.draw(g);
        if(showBBox) {
          g.setColor(new Color(0x80ff80ff, true));
          g.fill(drawable.getBounds());
        }
        g.dispose();
      }

    });
    jFrame.addMouseListener(new MouseAdapter() {

      @Override
      public void mouseClicked(final MouseEvent e) {
        switch(e.getButton()) {
          case MouseEvent.BUTTON1:
            ++curPen;
            if(curPen >= pens.length) {
              curPen = 0;
            }
            setPen();
            break;
          case MouseEvent.BUTTON2: {
            showBBox = !showBBox;
            break;
          }
          case MouseEvent.BUTTON3:
            ++curBg;
            if(curBg >= bgs.length) {
              curBg = 0;
            }
            jFrame.setBackground(bgs[curBg]);
            break;
        }
        jFrame.repaint();
      }

    });
    jFrame.setSize(new Dimension(800, 600));
    jFrame.setLocationRelativeTo(null);
    jFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    jFrame.setVisible(true);
  }