Code example for Preferences

Methods: putInt

0
        return new NoBackgroundControl(this);
    } 
 
    @Override 
    public void applyStudioConfig(Preferences prefs) {
        prefs.putInt("rThreshold", rThreshold);
        prefs.putInt("gThreshold", gThreshold);
        prefs.putInt("bThreshold", bThreshold);
    } 
 
    @Override 
    public void loadFromStudioConfig(Preferences prefs) {
        rThreshold = prefs.getInt("rThreshold", rThreshold);
        gThreshold = prefs.getInt("gThreshold", gThreshold);
        bThreshold = prefs.getInt("bThreshold", bThreshold);
    } 
 
    public void setBackgroundImage(BufferedImage img) {
        background = img;
    } 
}