html in a textfield



hello,

I want to display underlined text in a Jtextfield and I found out that in order to do that I need to use HTML so I tried that but found out that JTextfield doesn't render the HTML. So I tried JEditorPane and discovered I had to set the Type to "text/html". Well I'm sure that would work for what I need to display, however when I try to grab text out of that I get a bunch of html in addition to the text that is just in the textfield (all I want is the text, and no html, when I grab the text).

Is there a way to store html but only get plain text out of the jeditorpane? Can I just keep setting the Type to "text" when I need to grab text and put it back to "text/html" when I need to set the text or is there a better way overall to handle this?

I'm using Java 1.5 (which seems to leave out the ability for a Font object to have underlined text despite having italics and bold; how stupid is that?).

thanks
.



Relevant Pages

  • Re: html in a textfield
    ... that JTextfield doesn't render the HTML. ... would work for what I need to display, however when I try to grab text ... StyledDocument doc = JEditorPane.getDocument; ...
    (comp.lang.java.gui)
  • Re: html in a textfield
    ... that JTextfield doesn't render the HTML. ... would work for what I need to display, however when I try to grab text ... StyledDocument doc = JEditorPane.getDocument; ...
    (comp.lang.java.gui)
  • Re: html in a textfield
    ... that JTextfield doesn't render the HTML. ... would work for what I need to display, however when I try to grab text ... StyledDocument doc = JEditorPane.getDocument; ...
    (comp.lang.java.gui)
  • Re: html in a textfield
    ... that JTextfield doesn't render the HTML. ... would work for what I need to display, however when I try to grab text ... StyledDocument doc = JEditorPane.getDocument; ...
    (comp.lang.java.gui)
  • Re: Does
    ... Not when a document is served as text/html. ... If the browser notices anything which doesn't conform to XHTML/1.0 ... XHTML flavour, really ought to expect to be held to higher standards, ... Ideally, App.C would be ruled incompatible with HTML, and thus ultra ...
    (comp.infosystems.www.authoring.html)