Having an issue with a JScrollPane expanding its child JEditorPane just fine but forcing horizontal scroll bars when resizing it down again (instead of forcing the JEditorPane to recalculate wrapping).
The basic flow of code is as follows:
JFrame f = new JFrame();
JEditorPane jep = new JEditorPane();
JScrollPane jsp = new JScrollPane(jep);
f.add(jsp);
It’s a hack, but the best way I could find (without using ugly
ScrollPaneManagers) was to implement aComponentListeneron theJScrollPaneto resize the child component whenever it was resized.