This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
    Similar Threads
    is it possible to determine which browser is being used?
    maintain the format of xml message on browser
    Urgent. Pagination in word
    Opening a browser from a Java app
    Hyperlinks in JEditorPane