views:

21

answers:

0

hi i m the Processing user.. Currently i used the ControlP5 library for my graphical user interface.Here is the code i use

public void controlEvent( ControlEvent theEvent ) { if( theEvent.isGroup() ) {
eventValue = int(theEvent.group().value() ); 
println("eventValue before display "+eventValue); }
textArea_3 = controlP5.addTextarea ("T3","T", (int)(width* 0.24), (int)( height * 0.045 ), 1100, (int)(height * 0.135) );

and i put in the below code in draw() method

sPost =post.get(eventValue);
textArea_3.setText( sPost );

I got arrayIndexOutOfBondsExceptions. and it is not constant. If i change the width of textarea, the the error seem to be disappear for this particular post and change to next random post..