public void drawString(String str,double x,double y,int horizontal,int vertical,boolean framed,Color frameColor,double frameWidth,boolean banner,Color bannerColor){
  TextLayout tl=new TextLayout(str,FontUtilities.getAttributes(getFont()),getFontRenderContext());
  Point2D offset=drawFrameAndBanner(tl,x,y,horizontal,vertical,framed,frameColor,frameWidth,banner,bannerColor);
  drawString(str,offset.getX(),offset.getY());
}

public void drawString ( String str , double x , double y , int horizontal , int vertical , boolean framed , Color frameColor , double frameWidth , boolean banner , Color bannerColor ) { TextLayout tl = new TextLayout ( str , FontUtilities . getAttributes ( getFont ( ) ) , getFontRenderContext ( ) ) ; Point2D offset = drawFrameAndBanner ( tl , x , y , horizontal , vertical , framed , frameColor , frameWidth , banner , bannerColor ) ; drawString ( str , offset . getX ( ) , offset . getY ( ) ) ; }
draws frame , banner and aligned text inside
