my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes JEditorPane acting as web browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JEditorPane acting as web browser" Watch "JEditorPane acting as web browser" New topic
Author

JEditorPane acting as web browser

janne jounivich
Ranch Hand

Joined: Jan 11, 2005
Posts: 45
Hi guys,

I have the following kind of scenario I am trying to achieve. I have a frame in which I have currently a JEditorPane component. This component has gotta a Hyperlink listener listening to hyperlink actions on various URL.

It works ok but this functionality is not enough for me. What I am achieving is I wanna my jEditorPane to listen to submit button clicks as well and thereby doing necessary actions. Is this possible with jEditorPane or should I use another component to achieve my goal?

Or maybe I should approach the problem differently? Is is possible to open another program (in my case browser) with the help of eg.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + page);
inside Swing application?

I would appreciate any kind of help you can provide.

BR,Janne


----
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

There's the Bare Bones Browser Launcher, and BrowserLauncher2 as well as components developed by the Java Desktop folks - there's a cross platform browser, and a Windows-only one that wraps IE - there's also the JDIC Desktop class - which provides the "browse(URL)" method that launches the default browser.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JEditorPane acting as web browser
 
Similar Threads
Question about hyperlink...
Form in NetBeans
Clicking on HyperLink
repainting problems...
JEditorPane and css - will a custom EditorKit make it work?