如题

解决方案 »

  1.   

    swing中的JTextPane提供有这种功能,当前编辑区中文字、图片同时存在。如下代码
    JTextPane mytp = new JTextPane();
    mytp.insertIcon(new ImageIcon("c:\csdn.jpg"));
      

  2.   

    Swing的文本组件只有 JEditorPane 和 JTextPane 可以显示不同类型的文本,JTextPane 的功能最强大。
      

  3.   

    JTextPane还可以插入组件,用insertComponent(component);
      

  4.   

    搂主应该茅塞顿开了吧,楼上的各位仁兄解释的很详细了,用JTextPane就可以了