File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Rendering HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Rendering HTML" Watch "Rendering HTML" New topic

Rendering HTML

Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Hi All,
I am working on swing compionents. Now I have a button on my prom called "Open Docs", which I would like to point to locally stored HTML document. Is there any way I can get this doen. Obstacles may be, how to determine which browser is installed on the machine, as application is multi platform and so on. Also what if someone has not got browser and still would open the document or post a message that "broweser is not supproted" or something.
Thanks in advance
Love Nilesh Patel
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Hmmmm... two ideas:
  • Use a JEditorPane - this supports (basic) HTML anyway...
  • The first time a user trys to launch the help, have them choose the program they want to use. Save this somewhere and use it for any later accesses.

  • -Nate
    [ January 14, 2002: Message edited by: Nathan Pruett ]

    Write once, run anywhere, because there's nowhere to hide! - /. A.C.
    I agree. Here's the link:
    subject: Rendering HTML
    It's not a secret anymore!