I encountered a somewhat strange behaviour of Java Swing JTextPane. Why does JTextPane.setFont(null) sets monospaced font? It's totally illogical. I found it when I tried to debug JTextPane.setFont(Font.getFont(Font.MONOSPACED)), and it turned out that Font.getFont returns null.
Edit: when I getFont() after setting null, it returns java.awt.Font[family=Lucida Grande,name=Lucida Grande,style=plain,size=13], and I dont't think that it is monospaced.
When you call setFont(null) on a JTextPane, it sets the font to the default font of the JTextPane's parent container. If the parent container does not have a default font set, then it will use a default font that is usually monospaced.