Solved

Can i make links to web pages with java swing?

Posted on 2004-09-19
3
284 Views
Last Modified: 2012-05-05
Pretty much what the title says...

I want to be able to put a web link on a simple java swing program.
0
Comment
Question by:rt_vin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Expert Comment

by:OliWarner
ID: 12098079
errr... you'd have to have a load browser command... of which I cant find an explicit one...
0
 
LVL 4

Accepted Solution

by:
gdrnec earned 20 total points
ID: 12162404
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
 
LVL 1

Author Comment

by:rt_vin
ID: 12162563
Thanks Geoff, that's what i wanted :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question