|
-
Changing the way JTextPane renders HTML
Hello, I am using Java's JTextPane to display an HTML (with possibly CSS/XML) page. What I want to do is alter the way it renders some tags (like <!-- comment tags -->, or Flash <object> tags) and add additional tags to its rendering capability, both by hardcoding, and possibly (though this is of secondary importance) dynamically, to accomodate XML.
For example, JTextPane, by default, cannot render .swf flash files. It displays two red "??." I would like to be able to change that to a notice stating that JTextPane does not support flash objects.
For another example, It seems to be excluding the end ">" from links, displaying it as text, rather than hiding it with the rest of the HTML. Whether the </a> or <a href....>'s end tag, I cannot tell. I would like to be able to override somehow the way JTextPane renders links to fix that.
So far, I have had no success. The closest I have come is that the solution probaly lies with the HTMLEditorKit class, but I don't know for sure, or I wouldn't be asking here.
So: How can I alter the way JTextPane renders HTML tags, and add tags to its rendering capabilities?
Thanks in advance.
Last edited by Gengar003; 05-11-2006 at 12:33 AM.
Similar Threads
-
By software_develo in forum .NET
Replies: 13
Last Post: 04-18-2013, 10:50 PM
-
Replies: 0
Last Post: 07-14-2001, 11:01 AM
-
By praveen srinivas in forum Web
Replies: 1
Last Post: 01-16-2001, 09:52 AM
-
Replies: 0
Last Post: 11-17-2000, 09:03 AM
-
By james chung in forum Web
Replies: 0
Last Post: 09-16-2000, 02:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks