question: public void addUI ( Component component , int buffer , int width , int height ) { if ( fieldPanel != null ) { int lastX = - 1 ; for ( Component c : fieldPanel . getComponents ( ) ) { int x = c . getX ( ) + c . getWidth ( ) ; if ( x > lastX ) { lastX = x ; } } component . setBounds ( lastX + buffer , 0 , width , height ) ; fieldPanel . add ( component ) ; } }
target:  Adds the UI component to the field panel.