Can i make links to web pages with java swing?

Pretty much what the title says...

I want to be able to put a web link on a simple java swing program.
LVL 1
rt_vinAsked:
Who is Participating?
 
gdrnecCommented:
Of course you can.

The question is what does the link do? If, for instance, you are accessing servlet urls that don't return any exotic content, then it is as simple as opening the URL. I do this when I am converting to a Swing app from a servlet app so as to not lose functionality during the rewrite.

The problem arises when you need to deal with complicated content like flash etc... If you do need to deal with that kind of content, you could always command line invoke the default browser giving the url as the argument.


(e.g. java.lang.Runtime.getRuntime().exec("iexplore http://www.somelink.url/");

Hope this helps.

Geoff
0
 
OliWarnerCommented:
errr... you'd have to have a load browser command... of which I cant find an explicit one...
0
 
rt_vinAuthor Commented:
Thanks Geoff, that's what i wanted :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.