This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes showing a html file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "showing a html file" Watch "showing a html file" New topic

showing a html file

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Hi !
I have a small problems.I nedd to load & show an html file (text & pictures).
I try with HTML class - but this is not what I need.

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You can use a JEditorPane to display simple HTML... just text, pictures, tables, form elements, etc. but not any JavaScript or any other client side dynamic stuff. Just pass the URL of the resource you want to display to the JEditorPane constructor, or the setPage() method, and it should figure out your content is HTML.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Thankx !
Have you checked out Aspose?
subject: showing a html file
It's not a secret anymore!