I can\'t squeeze together the lines in a Java JTextPane if I set the content-type to text/html. I would like them as close together as they are when th
JTextPane
text/html
Try something like this
StyledDocument doc= textPane.getStyledDocument(); MutableAttributeSet attr= new SimpleAttributeSet(); StyleConstants.setLineSpacing(attr, -0.2f); //NOTE: negative value.
Looks like you are running windows. What version of JDK/JRE is in use?