The HTML content inside JEditorPane has blue background in Java -
have desktop email client program i'm working on in java , want show incoming mail content inside jeditorpane.
i've created htmleditorkit , set editor kit jeditorpane control this: editorpane.seteditorkit(htmleditorkit);
, messages, works fine others, shows background blue-colored one. tried add stylesheet rule kit, didn't work.
have been problem?
comments welcome.
edit:
jeditorpane txtcontent = new jeditorpane(); txtcontent.seteditable(false); txtcontent.setbackground(color.white); txtcontent.setbounds(316, 110, 598, 545); kit = new htmleditorkit(); txtcontent.seteditorkit(kit); htmldocument doc = (htmldocument)kit.createdefaultdocument(); txtcontent.setdocument(doc); txtcontent.settext("html content here.....");
when put "html content here....." part inside html file notepad, shows right thing.
but when put exact same content inside jeditorpane above, shows different styling(blue background).
Comments
Post a Comment