View Single Post
  #1 (permalink)  
Old 12-12-2007, 06:43 PM
asifsolkar asifsolkar is offline
Member
 
Join Date: Dec 2007
Location: India
Posts: 11
asifsolkar is on a distinguished road
jeditorpane help parsing html
I am developing an application which needs a web browser functionality like Mozilla or internet explorer.

I have tried several examples of displaying web pages in jEditorPane but it doesnt seem to work well for me

I am doing my development in netbeans 6.0 here is the code

Code:
private void jEdpaneBrowserHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { HyperlinkEvent.EventType type= evt.getEventType(); final URL url = evt.getURL(); if (type == HyperlinkEvent.EventType.ENTERED) { System.out.println("URL: " + url); }else if (type == HyperlinkEvent.EventType.ACTIVATED) { System.out.println("Activated"); EditorKit htmlKit = jEdpaneBrowser.getEditorKitForContentType("text/html"); HTMLDocument doc = (HTMLDocument) htmlKit.createDefaultDocument(); jEdpaneBrowser.setEditorKit(htmlKit); try { InputStream in = url.openStream(); //jEdpaneBrowser.setPage(url); jEdpaneBrowser.read(in, doc); in.close(); // set the combo } catch (IOException ioException) { System.out.println("Error following link" + ioException); jEdpaneBrowser.setDocument(doc); } }
but this code doesnt load pages properly like internet explorer or Mozilla
the pages that dont load are Google , Yahoo! etc

Flash pages are set blank nothing loads..

yahoo recomends me to upgrade the browser i feel jeditorpane cannot render html like InternetExplorer or Mozilla

Please help how can render this html , is there any html renderer which can help me do this .
Reply With Quote
Sponsored Links