protected void calculatePositionArray(){
  if (model == null) {
    return;
  }
  int pos=0;
  int items=model.getSize();
  positions=new int[items + 1];
  positions[0]=0;
  for (int i=0; i < items; i++) {
    Object value=model.getElementAt(i);
    JComponent component=renderer.getTickerRendererComponent(this,value);
    Dimension size=component.getPreferredSize();
    pos+=size.width + gap;
    positions[i + 1]=pos;
  }
}

protected void calculatePositionArray ( ) { if ( model == null ) { return ; } int pos = 0 ; int items = model . getSize ( ) ; positions = new int [ items + 1 ] ; positions [ 0 ] = 0 ; for ( int i = 0 ; i < items ; i ++ ) { Object value = model . getElementAt ( i ) ; JComponent component = renderer . getTickerRendererComponent ( this , value ) ; Dimension size = component . getPreferredSize ( ) ; pos += size . width + gap ; positions [ i + 1 ] = pos ; } }
calculate the positions of each of the items .
