• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

JTextpane html rendering problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I need to render a html page with both underline tag and strike through tag to same text
Eg:
<strike><u>Hello Swing World</u></strike>

It is not supported in the JTextpane, but it is supported in all the browsers
If strike through is used seperately, its working and if the underline tag is used seperately its also working fine
How can this problem be solved
I need to use both Underline and StrikeThrough on a same Text.

Thanx
shriny
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many things supported by current browsers that do not work with JTextPane. For what I know there are only commercial solutions that provide a browser component for java that can catch up with the current standard (see NetClue for example).
if you do not depend on html it might be good to use the StyleContext and the AttributeSet, but I suppose you want to browse html pages, so that's not a real alternative.
chantal
 
catch it before it slithers away! Oh wait, it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic