你怎么运行啊?
java -cp . mytextfield

解决方案 »

  1.   

    那个copy方法:
    Transfers the currently selected range in the associated
    text model to the system clipboard,是复制的当前选中的文本,你选中你的WE ARE SO HAPPY ,再按粘贴就是那些字了.
      

  2.   

    感谢楼上的提醒,能不能帮我把这个问题也看看
    http://community.csdn.net/Expert/topic/3156/3156782.xml?temp=.6218225
      

  3.   

    if(e.getSource()==copy)
    {
       tf.selectAll();
       tf.copy();
    }