Hi, just one more thing.
I have my notes stored as one long string, it may have one line, it may have ten.
So it may look like this in my gui notes text area:
When I format it with html in my JEditorPane all my notes are on a single line. How would I go about making notes as it is in my notes JTextArea? On seperate lines?
pf is a class PrinterFrame and text is a JEditorPane. rep is the Repair object, so rep.getNotes() get the notes but puts it all on one line, how wouldd i seperate the notes sring.
I hope this was a clear explanation!
Its still the same.
When I add notes to a Repair object I do it by typing into a JTxtArea, and get a newline simply by hitting enter and when I show the notes in another JTextArea it has the line breaks, like this
PINE AVENUE, CARRICKFERGUS, BT38 8EE, 07821771116
NOT POWERING UP //notes
MAKING BUZZING SOUND //notes
but when i try to show notes in a JEditorPane as above it puts the full sting on on line,like this:
NOT POWERING UP MAKING BUZZING SOUND //notes
YOu're not giving enough info to diagnose this properly (eg what are the eaxct strings that are in the areas). It seems you have new lines in the address etc, so what's different about the two problem descriptions?
So how do you think your enter/return key presses are represented in the notes variable? If you're not sure, try searching for "\n" characters in the string, eg System.out.println(notes.indexOf("\n"));
That's because the new lines are coded in the string as \n characters (the first at position 4 in the string), which are new lines in an ordinary text area, but ignored in an HTML context. To display them in HTML you need to replace all "\n" by "<br>" befreo displaying it. (There's a String method for that!)
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...