listen to an existing browser

B

Breaststroker

I am working on an existing implementation which uses

Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler " +
"http://www.login.website");

To point to an url when a user has performed an action on the Java
Application in Windows OS. There is a chance that this browser will be
behind the Java Application. Note the task manager has been disabled
in the Java Application. In order to bring it back, I need to either
create a console so that the user can toggle between the Java
Application and the browser or I will need to be able to bring the same
browser back without pointing to "http://www.login.website" all the
time. I did some search online and found someone mentioned something
about browser plug in. I do not have much experience on developing a
browser plug in and like to do it as soon as possible. Anyone has any
suggestion.

Thanks,

Breaststroker
 
D

ducnbyu

You might want to reconsider the browser plug-in. Actually it's a
control. I understand your misgivings, but the control will allow you
much greater control over the browser.

The drawback with the control is it only gives you the webpage. The
user will be able to click on hyperlinks, enter text or what ever you'd
normally do on the displayed pages. However, if you want the user to
be able to see or type in a url you have to provide a text control with
the appropriate listeners. If you want the user to be able to go back
or forward you have to provide the buttons with the appropriate
listeners. Etc. For the operations most commonly performed by a user
such as the ones just mentioned they are simple to build.

If reliability is a strong requirement the browser control is the way
to go.

If it is very important that the user be able to do all the things they
can (but rarely) do in IE for example (changing their security
settings) then your original approach is the better way to go.

Here's a link to a browser control that is simple to use:

http://help.eclipse.org/help31/nfto...ence/api/org/eclipse/swt/browser/Browser.html

It works with SWT but there is also this class that will allow you to
use SWT in AWT and vice-versa (I haven't used this yet, but it looks
good)

http://help.eclipse.org/help31/nfto...eference/api/org/eclipse/swt/awt/SWT_AWT.html:
 

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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top