View Full Version : displaying the divide sign in jva swing
kuskyboy
04-01-2005, 03:21 PM
I am having a little trouble displayng the mathematical divide sign (a paralel line with a dot above and below, you know what i mean) in swing,
i have tried refering to the ascii code but when the program runs it displays the * symbol. please can anyone help?
shmoove
04-01-2005, 06:29 PM
The standard ASCII table doesn't have a divide sign, so you probably looked into a a table of a certain encoding that doesn't match what the program is using. You should be using Unicode instead:
char divideSign = 0xf7;
String TenDividedByTwo = "10 \u00f7 2 = 5";
If that doesn't work either (I don't see why it shouldn't though), you can always fall back on using a colon ( ':' ) instead. When I was in primary it was often used instead of the division sign.
shmoove
kuskyboy
04-04-2005, 02:21 AM
thanks very much it worked a treat
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.