private static void setEventListener() {
        resizePercentSpinner.addChangeListener(e -> {
            if(((Integer) resizePercentSpinner.getValue()) <= 0) {
                resizePercentSpinner.setValue(1);
            }
        });
        
        resizeWidthSpinner.addChangeListener(e -> {
            if(((Integer) resizeWidthSpinner.getValue()) <= 0) {
                resizeWidthSpinner.setValue(1);
            }
            
            if(lockRatioBox.isSelected() && !resizeLocker) {
                resizeLocker = true;
                
                int value1 = ((Integer) resizeWidthSpinner.getValue());
                double diff1 = value1 - imageWidth;
                double diff2 = (imageHeight / imageWidth) * diff1;
                int value2 = (int) (imageHeight + diff2);
                resizeHeightSpinner.setValue(value2);
                resizeLocker = false;
            }
        });
        
        resizeHeightSpinner.addChangeListener(e -> {
            if(((Integer) resizeHeightSpinner.getValue()) <= 0) {
                resizeHeightSpinner.setValue(1);
            }
            
            if(lockRatioBox.isSelected() && !resizeLocker) {
                resizeLocker = true;
                
                int value1 = ((Integer) resizeHeightSpinner.getValue());
                double diff1 = value1 - imageHeight;
                double diff2 = (imageWidth / imageHeight) * diff1;
                int value2 = (int) (imageWidth + diff2);
                resizeWidthSpinner.setValue(value2);
                resizeLocker = false;
            }
        });
        
        customWidthHeightBtn.addActionListener(e -> {
            resizePercentSpinner.setEnabled(false);
            resizeWidthSpinner.setEnabled(true);
            resizeHeightSpinner.setEnabled(true);
            lockRatioBox.setEnabled(true);
        });
        
        percentBtn.addActionListener(e -> {
            resizeWidthSpinner.setEnabled(false);
            resizeHeightSpinner.setEnabled(false);
            lockRatioBox.setEnabled(false);
            resizePercentSpinner.setEnabled(true);
        });
        
    }