Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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

Open a Browser using Java

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi masters

in one my project i have to create an HTMl editor for that i hve to
make a preview button which automatically saves the content of the editor as .htm file and must open automatically in a browser

so while clicking preview button a browser must be opened automatically with the contents of the TextArea

what can we do for that

Please help me

Thanks in advance
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you do something like this:

Assuming this is on a windows system and you want to use IE, of course
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Deitel book "Advanced Java 2 Platform How to Program" includes an example application that displays web pages. The example source code from the book can be downloaded at http://www.deitel.com/books/downloads.html#advjHTP1

Take a look at the WebBrowser example in chapter 2. It does what you're trying to figure out.
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://browserlauncher.sf.net
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic