posted 11 years ago
i solved this particular problem, but it creates another.
what i did was set the preferred size of the JTextPane(i also gave it a compound border).
added it to a JPanel with a FlowLayout.
and put the JPanel in the JScrollPane.
it now looks and works almost exactly like other word processors except now it is limited to a single page.
but this is a different problem so i am marking this one resolved.
if you would like to see what it looks like now, here is the code:
i notice that Wordpad works differently than Open Office. it changes the width when you change the page setup, but it displays no border and it is one continuous piece of text. it does not display the separate pages. it does not even have a print preview. and this is the windows 8 version. duplicating this seems more promising.