Code:
JTextPane a = new JTextPane();
DefaultStyledDocument b = new DefaultStyledDocument();
a.setDocument(b);
My application was working with an error. When I extended DefaultStyledDocument everything fell apart and it materialised that.. getStyledDocument() does not return b!
I cannot cast the returned StyledDocument to a DefaultStyledDocument (or its extended brother).
Can someone clarify why this is happening, and what needs to change?
Thanks.
--Glen
Memoria mihi benigna erit qui eam perscribam