public <T extends JTextField> void rangeFix(T text){
	try {
	    double value = Double.parseDouble(text.getText());
	    double min = 0;
	    double max;
	    if (text != field_freq && text != field_volume)
			max = 1;
	    else if(text == field_freq)
			max = 10000;
		else
			max = 100;
	    
	    if (value > max)
		value = max;
	    else if (value < min)
		value = min;
	    
	    text.setText(String.valueOf(value));
	} catch (Exception ex) {
	    ex.printStackTrace();
	}
    }