dimanche 12 avril 2015

Is there anyway to hardcode a character in Java so that when I run the program between different platforms it still show up the same way?

I have been writing a mineSweeper program that uses square box character. According to this website: http://www.ssec.wisc.edu/~tomw/java/unicode.html, the character is '\u25A2' so when I test on my Macintosh Eclipse. Please refer to this link for picture: http://imgur.com/CM3Ot4t (Sorry I did not have enough reputation to post image yet). In Mac, it show up perfectly like the below half of the picture but in windows (the above half), the square shrinks! Basically, I want to align the box with other characters that I use but in windows, everything is just messed up. So I want to ask if there is anyway to bring these exact same characters from macintosh and use it on every platforms?


Aucun commentaire:

Enregistrer un commentaire