我想在一个面板容器中放一个网页 比如像讯雷右侧那样的  

解决方案 »

  1.   

    用JEditorPane就可以显示htm文件啦
      

  2.   

    同意楼上!
    用JEditorPane
    LZ学习一下吧!
      

  3.   

    class Hyperactive implements HyperlinkListener {
     
             public void hyperlinkUpdate(HyperlinkEvent e) {
                 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                     JEditorPane pane = (JEditorPane) e.getSource();
                     if (e instanceof HTMLFrameHyperlinkEvent) {
                         HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;
                         HTMLDocument doc = (HTMLDocument)pane.getDocument();
                         doc.processHTMLFrameHyperlinkEvent(evt);
                     } else {
                         try {
                             pane.setPage(e.getURL());
                         } catch (Throwable t) {
                             t.printStackTrace();
                         }
                     }
                 }
             }
         }
      

  4.   

    JEditorPane a = new JEditorPane();
    a.setPage("http://www.sina.com.cn");OK!