This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Opening web pages in swing application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Opening web pages in swing application" Watch "Opening web pages in swing application" New topic
Author

Opening web pages in swing application

shiva machhewar
Greenhorn

Joined: Aug 13, 2011
Posts: 4
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

Joined: Jun 19, 2010
Posts: 825
    
    5

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.


The quieter you are, the more you are able to hear.
shiva machhewar
Greenhorn

Joined: Aug 13, 2011
Posts: 4
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

Joined: Jun 19, 2010
Posts: 825
    
    5

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
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
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.


Ping & DNS - my free Android networking tools app
 
 
subject: Opening web pages in swing application
 
Similar Threads
Download Swing application from web
can we use Swing Component in JSP page
How to add header and footer to dynamically generated page for print
Some demo with JTable with Form
Session ID