public void paintTrack(Graphics g) {
        int width = parentSlider.getWidth();
        int height = parentSlider.getHeight();
        int all = parentSlider.getMaximum() - parentSlider.getMinimum();
        int value = parentSlider.getValue();
        if (backgroundImage != null) {
            if (parentSlider.getOrientation() == JSlider.HORIZONTAL) {
                g.drawImage(backgroundImage, 0, (height - backgroundImage.getHeight(slider)) / 2, parentSlider);
            } else {
                g.drawImage(backgroundImage, (width - backgroundImage.getWidth(parentSlider)) / 2, 0, parentSlider);
            }
        }
        if (activeBackImage != null) {
            if (parentSlider.getOrientation() == JSlider.HORIZONTAL) {
                g.drawImage(activeBackImage, 0, (height - activeBackImage.getHeight(slider)) / 2, width * value / all, activeBackImage.getHeight(slider), 0, 0, width * value / all, activeBackImage.getHeight(slider), slider);
            } else {
                int sx = (width - activeBackImage.getWidth(parentSlider)) / 2;
                g.drawImage(activeBackImage, sx, height - (height * value / all), sx + activeBackImage.getWidth(slider), height, 0, height - (height * value / all), activeBackImage.getWidth(slider), height, slider);
            }
        }
    }