[Bluej-discuss] "Backspace" escape character
RDP
robdepasquale at msn.com
Sat Jan 12 18:16:54 GMT 2008
My experience has been that the font selected will print a square character for unknown values.
The encoding for the font, Western (ISO) also affects the output. So the character set used (for example Unicode). I've tried selecting a font-face in the code.
----- Original Message -----
From: TJ Evert
To: bluej-discuss at bluej.org
Sent: Friday, January 11, 2008 9:53 AM
Subject: [Bluej-discuss] "Backspace" escape character
Dear all,
My class and I are writing methods that act on Strings and (in the past) I've used the "\b" escape character for an "untype()" method (which uses a delay() method) as follows:
public static void untype(String str)
{
int len = str.length();
System.out.print(str);
for(int i = 0; i < len; i++)
{
delay(1000);
System.out.print("\b \b");
}
}
public static void delay(long milliSeconds)
{
long now = System.currentTimeMillis();
long later = now + milliSeconds;
while(later > now)
{
now = System.currentTimeMillis();
}
}
The problem is that BlueJ types out a "box" character. Any thoughts?
TJ Evert
------------------------------------------------------------------------------
_______________________________________________
mailing list bluej-discuss at bluej.org
To unsubscribe or change your preferences, go to
http://lists.bluej.org/mailman/listinfo/bluej-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20080112/fd34e1ac/attachment.html
More information about the bluej-discuss
mailing list