Skip to main content
11 events
when toggle format what by license comment
Nov 24, 2021 at 19:12 vote accept Newbee
Nov 24, 2021 at 18:35 comment added Newbee the second one worked for me and I already upvoted your answer. thanks a lot.
Nov 24, 2021 at 16:47 comment added Newbee I write a file first then I retrieved/append them to JTextArea.
Nov 24, 2021 at 16:47 comment added Der_Reparator Okay, please try out my suggested fixes and comment again if those don't fix your problem.
Nov 24, 2021 at 16:46 comment added Newbee No i put some data to the txt file first then i retrieve them again via jtextarea.
Nov 24, 2021 at 16:43 comment added Der_Reparator So you enter the text in a JTextArea, save it to a .txt file by using the above formatting String and then you load it back into the JTextArea but with the worng alignment?
Nov 24, 2021 at 16:39 comment added Newbee it goes exactly to text file but when retrieve again and put to jtextarea the alignment is not correct.
Nov 24, 2021 at 16:38 comment added Newbee String format = "%-15s %-15s %-15s";
Nov 24, 2021 at 16:38 history edited Der_Reparator CC BY-SA 4.0
added hint to get monospaced font working
Nov 24, 2021 at 16:38 comment added Newbee I am currently using this format to write data to txt file
Nov 24, 2021 at 16:35 history answered Der_Reparator CC BY-SA 4.0