貌似有点难度啊,有人知道吗?

解决方案 »

  1.   

    JTextPane jt=new JTextPane();
    JScrollPane js=new JScrollPane(jt);
    然后把js加入到别的面板里面去就可以 了
      

  2.   

    试试JTextPane的
    public void insertComponent(Component c)
      

  3.   


    JTextPane textPane = new JTextPane(); 
    JScrollPane textScrollPane = new JScrollPane();
    textScrollPane.getViewport().add(textPane);这样就可以了,将JTextPane添加到JViewport(视口)中
      

  4.   

    主要是没加到面板上去    想下  首先有个面板  面板里有JScrollPane  然后把JTextPane 加到JSCrollPane里  再把  JSCrollPane加到面板上去