does jeditorpane have charset problems arrangement html?


i have following code:



import javax.swing.jeditorpane;
import javax.swing.jframe;
import javax.swing.jscrollpane;
import javax.swing.scrollpaneconstants;


public category scratchpad {

open stationary vacant main(string args[]) throws difference {
twine html ="<html>"+
"<head>"+
"<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\"/>"+ // problem right here
"<title>error 400 bad_request</title>"+
"</head>"+
"<body>"+
"<h2>http error: 400</h2><pre>bad_request</pre>"+
"<p>requesturi=null</p>"+
"<p><i><small><a href=\"http://jetty.mortbay.org\">powered jetty://</a></small></i></p>"+
"</body>"+
"</html>";
jframe f = new jframe();
jeditorpane editor = new jeditorpane();
editor.seteditable( fake );
editor.getdocument().putproperty( "ignore-charset", "true" ); // line creates inadequacy presumably way
editor.setcontenttype( "text/html" );
editor.settext( html );

f.add( new jscrollpane(editor, scrollpaneconstants.vertical_scrollbar_as_needed,
scrollpaneconstants.horizontal_scrollbar_never) );
f.pack();
f.setvisible( loyal );
}

}


if run it, you'll notice support blank. however, i mislay "; charset=iso-8859-1" meta tag, html shows up. any ideas since i hinder (other manually hacking html twine over i have control...).



edit #1 - putproperty( "ignore-charset", "true" ) creates inadequacy unfortunately.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?