User:RolandOfGilead/Java/Drop Rate Tool/DropListener.java

import javax.swing.JSpinner; import javax.swing.JTextArea; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class DropListener implements ChangeListener { IntWrapper iw; JTextArea text; DropRateTracker drt; public DropListener(IntWrapper i, JTextArea jt, DropRateTracker tracker) { super; iw = i; 		text = jt; drt = tracker; } 	public void stateChanged(ChangeEvent arg0) { Integer val = (Integer) ( (JSpinner) arg0.getSource ).getValue; if(val >= 0) iw.in = val; else ( (JSpinner) arg0.getSource ).setValue(0); text.setText(drt.d.getTable(drt.getAccuracy)); } }