JTextField.setText(String s) not working?

I have some code in a for loop that creates a certain number of JTextfields directly to the right of JSliders. Each JSlider has an anonymous inner class with a listener. So what I do on the listener is just go through the array and test if the corresponding JSlider is equal to the source of the event. Then I write the value in the Slider to the JTextField with the array index equal to the index that I figured out comparing JSliders to the JSlider source. Basically, I know I have the correct index and the correct value, but it doesn't show up in the JTextField. Here's my code segment.

[code]

for(int i=0;i<numSliders;i++){

if(((JSlider)(ce.getSource())).equals(sliderArray)){

fieldArray.setText(Integer.toString(((JSlider)(ce.getSource())).getValue()));

fieldArray[0].setText("hi"); //this doesn't even work

System.out.println(i); //this prints the right index every time

System.out.println(Integer.toString(((JSlider)(ce.getSource())).getValue()));//this prints the right value every time

}//end of if

}//end of for>

[1107 byte] By [zachvaca] at [2007-10-1 0:34:43]
# 1
crosspost http://forum.java.sun.com/thread.jspa?threadID=579682
macrules2a at 2007-7-7 16:21:54 > top of Java-index,Security,Event Handling...
# 2
You could have saved us the hassle, by doing this yourself :-( http://forum.java.sun.com/thread.jspa?threadID=579686&tstart=0
macrules2a at 2007-7-7 16:21:54 > top of Java-index,Security,Event Handling...