Hello friends,
Got a new question, can someone explain to me how to put an HTML link in my Java program. Example ... "Click here to visit the developer website". So when someone will click on the link, the web page should automatically open in the browser.

I searched on the web, but can't find nothing. Thanks in advance.
Bybye.

Recommended Answers

All 3 Replies

java.awt.Desktop.getDesktop().browse(new URI("http://www.your.url")); (needs Java .6)

You rock ... thanks buddy, thats what I needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.