java - JTextPane shows color different from browser of an HTML -


i loading simple html page in jtextpane showing different color when viewed in browser, , div tag's height , width changed.

the html file has 1 div tag nd is:

<div height ="200" width="100" style="background-color:#0f9">this div tag  </div> 

i calling setpage jtextpane.

this how displayed in jtextpane

this how displayed in jtextpane

this how should dislplayed(it firefox) this how should dislplayed(it firefox)

i ran same problem. documented here (http://docs.oracle.com/javase/6/docs/api/javax/swing/text/html/css.html), can use background-color. value of has contain 7 characters, example

background-color:#00ff99;


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -