public void paint(Graphics graphics) {
        Graphics2D g = (Graphics2D) graphics;
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g.setColor(getBackground());
        g.fillRect(0, 0, getWidth(), getHeight());
        for (DrawableItem item : items) {
            if (item.getType() == 0) {
                dic.paint(item, g);
            } else {
                dic.paintPath(item, g);
            }
        }
        
    }