@Override
    public void paint(Graphics graphics){
        if (image==null)
            return;
        super.paint(graphics);
        graphics.drawImage(getBitmap(), offset, 0, null);
        if (offset==0){
            return;
        }
        if (offset<0) {
            graphics.drawImage(getBufferedImage((SwingBitmap) image.getNext().getBitmap()), image.getBitmap().getWidth() + offset, 0, null);
        }
        if (offset>0) {
            graphics.drawImage(getBufferedImage((SwingBitmap) image.getPrev().getBitmap()), offset - image.getBitmap().getWidth(), 0, null);
        }
    }