aspose file tools*
The moose likes Beginning Java and the fly likes Open a Browser using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Open a Browser using Java" Watch "Open a Browser using Java" New topic
Author

Open a Browser using Java

shreehari Gopalakrishnan
Ranch Hand

Joined: Jun 01, 2004
Posts: 30
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
Darin Niard
Ranch Hand

Joined: Jun 08, 2004
Posts: 118
Well you do something like this:

Assuming this is on a windows system and you want to use IE, of course
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
http://browserlauncher.sf.net


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
 
jQuery in Action, 2nd edition
 
subject: Open a Browser using Java