// JP opened flex table

Click to See Complete Forum and Search --> : How can i add link in an application


aamirshan
February 5th, 2002, 12:58 AM
HI,i want to add url link in an application how can i do that.plz give me code example.thanks

dlorde
February 5th, 2002, 10:22 AM
Please explain in more detail - what are you trying to achieve? What kind of application is it?

Dave

Norm
February 5th, 2002, 10:22 AM
What do you mean by "add url link"?
Does that mean that you want your application to connect to a server using the HTTP protocol to send a request and get a response from the server?
That can be done using the URLConnection class. Use this forum's Search to find code examples that use this class.


Norm

aamirshan
February 6th, 2002, 12:05 AM
HI,first thanks for the response basically i develope a application in JFrame there are buttons labels,textfield in it.Now i want to add url link in this application mean when user click on a label it goes to that website whose link is added in this application.
once again thanks for your participation.

Sarun
February 6th, 2002, 04:17 AM
Runtime.getRunTime().exec(url);
url-String type

This will link to the url specified by you using the default browser.

dlorde
February 6th, 2002, 05:01 AM
If you are running a Windows operating system and want your application to trigger your default browser to navigate to a selected URL, Sarun's reply to your post should help.

If that's not what you mean by "it goes to that website", you'll have to explain what you do mean.

Dave

Norm
February 6th, 2002, 06:46 PM
Your solution doesn't work on a Win98 system.
You need to add "start " before the URL to invoke a browser.

Norm

//JP added flex table