Solved

Can i make links to web pages with java swing?

Posted on 2004-09-19
3
268 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
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sorting in Excel with Group Headers if the Exist 2 89
Looking for example pivot year code used in Y2K 4 68
Image decoding from Camera 3 85
Help Required 2 30
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

785 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