Thread View: borland.public.jbuilder.java.api
7 messages
7 total messages
Started by Willie
Tue, 17 Jun 2003 01:19
SetCursorPos
Author: Willie
Date: Tue, 17 Jun 2003 01:19
Date: Tue, 17 Jun 2003 01:19
6 lines
976 bytes
976 bytes
Hi: Win32 API SetCursorPos can set location of the cursor in Windows O.S. My question is.....Is there a Java API can do this? Willie.
Re: SetCursorPos
Author: Lori M Olson (TeamB)
Date: Tue, 17 Jun 2003 22:26
Date: Tue, 17 Jun 2003 22:26
30 lines
1705 bytes
1705 bytes
Willie wrote: > Hi: > > Win32 API SetCursorPos can set location of the cursor in Windows O.S. > My question is.....Is there a Java API can do this? > > Willie. > > Try java.awt.Robot. -- Regards, Lori Olson (TeamB) ------------ Save yourself, and everyone else, some time and search the newsgroups and the FAQ-O-Matic before posting your next question. Google Advanced Newsgroup Search http://www.google.ca/advanced_group_search Other Newsgroup Searches: http://www.borland.com/newsgroups/ngsearch.html Joi Ellis's FAQ-O-Matic: http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: SetCursorPos
Author: Willie
Date: Wed, 18 Jun 2003 00:59
Date: Wed, 18 Jun 2003 00:59
34 lines
1750 bytes
1750 bytes
Hi Lori Olson:
Thanks for your reply.
I can use System.out.println("String1"); to output a "String1" on the
screen.
How can I output the string at specific location in a DOS BOX(console
Application)?
Is there a Java API can do this?
Willie.
"Lori M Olson (TeamB)" <javadragon@techie.com> ?????
news:3EEF9578.8090308@techie.com...
> Try java.awt.Robot.
>
> --
>
> Regards,
>
> Lori Olson (TeamB)
>
> ------------
>
> Save yourself, and everyone else, some time and search the
> newsgroups and the FAQ-O-Matic before posting your next
> question.
>
> Google Advanced Newsgroup Search
> http://www.google.ca/advanced_group_search
> Other Newsgroup Searches:
> http://www.borland.com/newsgroups/ngsearch.html
> Joi Ellis's FAQ-O-Matic:
> http://www.visi.com/~gyles19/fom-serve/cache/1.html
>
Re: SetCursorPos
Author: Sultanbek Tezadov
Date: Wed, 18 Jun 2003 05:41
Date: Wed, 18 Jun 2003 05:41
23 lines
1742 bytes
1742 bytes
I believe you can't unless (I guess) you use JNI calls. The reason is IMHO
that Java is a multiplatform environment. And it can't provide platform
specific features. Other platforms (Unix, Mac, ...) than MS DOS may lack
console cursor positioning. For example, on Unix there is an optional
library for console applications -- Curses (Ncurses).
Moreover Java is not very friendly for writing rich console applications (it
lacks convenient input routines that parse users input into primitive types
values, like Pascal's read() does).
--Sultan
Willie wrote:
> Hi Lori Olson:
>
> Thanks for your reply.
> I can use System.out.println("String1"); to output a "String1" on the
> screen.
> How can I output the string at specific location in a DOS BOX(console
> Application)?
> Is there a Java API can do this?
>
> Willie.
Re: SetCursorPos
Author: Tor Iver Wilhelmsen (TeamB)
Date: Wed, 18 Jun 2003 06:30
Date: Wed, 18 Jun 2003 06:30
16 lines
1504 bytes
1504 bytes
"Willie" <Willie.nospam@nospam.pchome.com.tw> writes:
> How can I output the string at specific location in a DOS BOX(console
> Application)?
> Is there a Java API can do this?
No. But you could (possibly) send the escape codes used to do the
actual positioning. The codes can be found at
http://www.termsys.demon.co.uk/vtansi.htm and ESC is ASCII 27
char ESC = (char) 27;
System.out.print(ESC+"[{"+row+"};{"+column+"}H"+text);
System.out.flush();
In my test, this didn't work on my Win2k's cmd shell, but it could be
that the support for ANSI/vt100 is less than perfect.
Re: SetCursorPos
Author: Lori M Olson (TeamB)
Date: Wed, 18 Jun 2003 17:30
Date: Wed, 18 Jun 2003 17:30
33 lines
2096 bytes
2096 bytes
Willie wrote:
> Hi Lori Olson:
>
> Thanks for your reply. I can use System.out.println("String1"); to
> output a "String1" on the screen. How can I output the string at
> specific location in a DOS BOX(console Application)? Is there a Java
> API can do this?
>
> Willie.
Ah, on the console. That's really different. There's nothing in Java,
per se, to help you do that. You might want to go Google something like
"java console curses library" and see what you find. There might be a
library out there you could use.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: SetCursorPos
Author: Willie
Date: Thu, 19 Jun 2003 05:57
Date: Thu, 19 Jun 2003 05:57
5 lines
1058 bytes
1058 bytes
Hi Lori Olson, Tor Iver, Sultan: Thanks for your informations. Willie.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads