TextPaneCanvas tidying.

Use new LinePosition method.
Split some of the huge methods up into smaller ones.
Fix some Netbeans-induced wonky line wrapping.
Bit more tidying.
Merge pull request #5 from csmith/textpane

TextPane tidying.