Hello,
Although you can do that in the JEditorPane, the
editor pane will
load the page in itself. So, I think that is not what
you want. I know of a
method which works well, and even softwares like
NetBeans do the same. Just
use the Runtime.exec() function to start browser.
These are the steps to be
followed:
1) Create a button, which acts like a Hyperlink
listener.
2) The actionPerformed function of the button
ActionListener, just
starts the browser using Runtime.exec() method, which
will run the
application. For internet explorer the command is
"iexplore" to that
command, just pass the URL as an argument.
3) That's it, your own hyperlink is ready.
Limitations:
1) Your program cannot run in Linux, because Linux
does n't have IE
(so portability is at a stake)
2) iexplore may not be the default browser in every
computer. So,
the browser might not be updated because user might be
using some other
browser such as Opera.
Anyway, if the Operating System is Windows, and if
you don't want
your app to be portable, use the method I mentioned.
And now, you can also do one thing. Instead of
harcoding iexplore
command, you can place a separate properties file,
where in the broswer's
command is stored. And the user is asked about the
browser to be used, while
the application is installing. So, your application
will be portable. Cool,
now work out.
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~->
If you have any comments or questions, submit it on the message board.
NO spam/ads/job posting or you will be BANNED from this group. Exception can be
made it happen by notify me ahead of time.
all new members' message will be verified by me (spam..) before it get posted.
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/java_official/post?act=reply&messageNum=17911
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/java_official/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/