how to display a URL link in a simple dialog?

L

lucy

Dear all,

I want to design a very simple dialog, asking a question, expect an answer;
or warning the user about something without expecting an answer. In either
case, I would like to have a URL link on the dialog window, and upon user
clicking on that link, a new browser window will be pop up and show that
webpage.

I guess this should be able to done fairly easily in Java,

How to do that?

Thank you so much!

-Lucy
 
I

Ike

I know that Real Gagnon has exactly what you are looking for in this regard
in "Real's How-to".

Dont have the URL offhand -- but iyou can surely google it up. -Ike
 
J

Jacob

lucy said:
I want to design a very simple dialog, asking a question, expect an answer;
or warning the user about something without expecting an answer. In either
case, I would like to have a URL link on the dialog window, and upon user
clicking on that link, a new browser window will be pop up and show that
webpage.

I guess this should be able to done fairly easily in Java,

If you are an applet, you're already in a browser
context, and Applet.getContext().showDocument (URL)
does what you are requesting.

Otherwise this is actually not so easy, as you need
to access the client browser of which you don't really
know anything. Also, being an external program, problems
might be difficult to catch in your program.

This is probably as good as it can get:

http://geosoft.no/software/browser/Browser.java.html

Use one of:

Browser.openUrl (URL);
Browser.openUrl (String);
Browser.openUrl (File);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top