• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JEditorPane acting as web browser

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic