Results 1 to 2 of 2
  1. #1
    togie is offline Member
    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0

    Default Spacing issues when appending to JTextArea

    hey there, im having a slight issue.

    Ex.
    000010000
    000100001
    000020000
    000100000
    000300000
    001000200
    004020002

    when appending multiple lines of a string with certain fonts the end of the strings do not line up.

    as i am making a map in ascii graphics i would love for them to line up lol

    any help ould be greatly appreciated!

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,358
    Rep Power
    6

    Default Re: Spacing issues when appending to JTextArea

    Its the font used - you need a monospaced (or "fixed-width") font. Google "java monospace font", you'll get examples.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. JTextArea, iText and spacing isuess
    By Karlovsky120 in forum AWT / Swing
    Replies: 4
    Last Post: 08-14-2013, 02:39 PM
  2. Spacing....
    By micolord in forum New To Java
    Replies: 8
    Last Post: 10-10-2011, 03:53 PM
  3. [Q] Spacing Help
    By iriscience in forum New To Java
    Replies: 7
    Last Post: 02-08-2011, 02:44 AM
  4. Problems appending JTextArea
    By Gregadeaux in forum AWT / Swing
    Replies: 1
    Last Post: 12-14-2009, 07:08 AM
  5. Help with spacing in java
    By barney in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •