Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening web pages in swing application

 
shiva machhewar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to open a web page in swing application. Once it is opened I am required to take information for every click on every link because I want to do web harvesting on the respective and corresponding further pages.
I tried to google it but, all I got is JXbroswer api which is the paid one. If I could get some other suggestions that would be great. Thanks in advance. Looking forward for response.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JEditorPane can be used to display web pages and with appropriate listener (HyperlinkListener) component get's notified each time user clicks on a link so you can further process it.
 
shiva machhewar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all thanks for the reply.
But JEditorPane does not provide support for Rich internet applications. It does not provide support for html5 and now a days most of the websites are moving to html5. If you have some other option that would have been helpful.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you said nothing in your original post about HTML5, and I quote:
I need to open a web page in swing application. Once it is opened I am required to take information for every click on every link because I want to do web harvesting on the respective and corresponding further pages.


As for further requirement about HTML5, you will probably have to take a look around for a custom component that will provide functionalities you need, or develop one yourself. Or, perhaps some Ranchers can point you in the right direction.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, JEditorPane supports HTML 3.2 and nothing else, nor is it likely that it ever will. For something more advanced (although just as dormant) check out http://lobobrowser.org/

For programmatic access to web pages -such as scraping- a much better (and up-to-date) solution is the HtmlUnit library.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic