Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Open a web page from a java standalone class

 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I need to open a web page say "www.google.com" from a java standalone class. I am using JDK 1.5.
Any help is appreciated...

Thanks
Mansi
 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution. I am posting it here for people who might face the similar issue later. This is customized for windows applications.

 
salvin francis
Bartender
Posts: 1274
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isnt thre a component in swing that allows you to load an html page via url ?

I am not sure about the name, its been long since i saw swing

i think its the JEditorPane (i may be wrong)
 
salvin francis
Bartender
Posts: 1274
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to the following link :

how to create a simple browser in swing
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

That Swing component supports a version of HTML that's been obsolete for so long that it's unlikely to render recent web pages properly (it supports HTML 3.2, no CSS, no JavaScript). A much better alternative is the Lobo web browser component.

A better (read: cross-platform) alternative for opening a page in a browser would be to use Bare Bones Browser Launch.
 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for the response
 
salvin francis
Bartender
Posts: 1274
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, like i said, its a long time since i touched swing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic