protected void paintComponent(Graphics g) {
        if (isOpaque()) {
            Dimension size = getSize();
            g.setColor(getBackground());
            g.fillRect(0, 0, size.width, size.height);
        }

        int stepSize = 0;
        int cDist = 0;
        int rDist = 0;

        for (int vectorIndex = 0; vectorIndex < resultVector.size(); vectorIndex++) {
            double coreDistance = ((DataObject) resultVector.elementAt(vectorIndex)).getCoreDistance();
            double reachDistance = ((DataObject) resultVector.elementAt(vectorIndex)).getReachabilityDistance();

            if (coreDistance == DataObject.UNDEFINED)
                cDist = getHeight();
            else
                cDist = (int) (coreDistance * verticalAdjustment);

            if (reachDistance == DataObject.UNDEFINED)
                rDist = getHeight();
            else
                rDist = (int) (reachDistance * verticalAdjustment);

            int x = vectorIndex + stepSize;

            if (isShowCoreDistances()) {
                /**
                 * Draw coreDistance
                 */
                g.setColor(coreDistanceColor);
                g.fillRect(x, getHeight() - cDist, widthSlider, cDist);
            }

            if (isShowReachabilityDistances()) {
                int sizer = widthSlider;
                if (!isShowCoreDistances()) sizer = 0;
                /**
                 * Draw reachabilityDistance
                 */
                g.setColor(reachabilityDistanceColor);
                g.fillRect(x + sizer, getHeight() - rDist, widthSlider, rDist);
            }

            if (isShowCoreDistances() && isShowReachabilityDistances()) {
                stepSize += (widthSlider * 2);
            } else
                stepSize += widthSlider;
        }
    }