Code example for JSlider

Methods: setValue

0
            cache = c;
        } else { 
            throw new IllegalArgumentException("cache not an instance of SunTileCache");
        } 
 
        memoryCapacitySlider.setValue((int)(cache.getMemoryCapacity() / (1024L * 1024L)));
        memoryThresholdSlider.setValue((int)(100.0F * cache.getMemoryThreshold()));
    } 
 
    /** 
     * Provide access to the statistics object 
     * @param stats a Statistics object 
     * @since TCT 1.0 
     */ 
    public void setStatistics(Statistics stats) {
        statistics = stats;
    } 
 
    /** 
     * set memory capacity slider range to proper values.  If the value