Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • I am currently using this format to write data to txt file
    – Newbee
    Commented Nov 24, 2021 at 16:38
  • String format = "%-15s %-15s %-15s";
    – Newbee
    Commented Nov 24, 2021 at 16:38
  • it goes exactly to text file but when retrieve again and put to jtextarea the alignment is not correct.
    – Newbee
    Commented Nov 24, 2021 at 16:39
  • 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? Commented Nov 24, 2021 at 16:43
  • No i put some data to the txt file first then i retrieve them again via jtextarea.
    – Newbee
    Commented Nov 24, 2021 at 16:46