private int drawLabelStringValign(Graphics g,Label l,String str,int x,int y,int iconStringHGap,int iconHeight,int textSpaceW,int fontHeight){
switch (l.getVerticalAlignment()) {
case Component.TOP:
    return drawLabelString(g,l,str,x,y,textSpaceW);
case Component.CENTER:
  return drawLabelString(g,l,str,x,y + iconHeight / 2 - fontHeight / 2,textSpaceW);
default :
return drawLabelString(g,l,str,x,y + iconStringHGap,textSpaceW);
}
}

private int drawLabelStringValign ( Graphics g , Label l , String str , int x , int y , int iconStringHGap , int iconHeight , int textSpaceW , int fontHeight ) { switch ( l . getVerticalAlignment ( ) ) { case Component . TOP : return drawLabelString ( g , l , str , x , y , textSpaceW ) ; case Component . CENTER : return drawLabelString ( g , l , str , x , y + iconHeight / 2 - fontHeight / 2 , textSpaceW ) ; default : return drawLabelString ( g , l , str , x , y + iconStringHGap , textSpaceW ) ; } }
implements the drawstring for the text component and adjust the valign assuming the icon is in one of the sides
