drawString(String str, int x, int y)

解决方案 »

  1.   

    g.drawString("I love you ",x,y);x,y是字符串在容器上的位置。
      

  2.   

    兄弟,没有drawString(String s)这个方法的。
    abstract  void drawString(AttributedCharacterIterator iterator, int x, int y) 
              Draws the text given by the specified iterator, using this graphics context's current color. 
    abstract  void drawString(String str, int x, int y) 
              Draws the text given by the specified string, using this graphics context's current font and color. 你自己又没有drawString(String s)的方法,当然找不到拉