permaculture playing cards*
The moose likes Java in General and the fly likes Does it possible to draw text in console with java(like using TurboC++3.0)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Does it possible to draw text in console with java(like using TurboC++3.0)?" Watch "Does it possible to draw text in console with java(like using TurboC++3.0)?" New topic
Author

Does it possible to draw text in console with java(like using TurboC++3.0)?

keisin syu
Greenhorn

Joined: Dec 04, 2002
Posts: 25
well, my question is like I sayed in the title.
the effect is like this one to draw a box)

And it should be possible to place cursor in the any place to wait for user input.
(what I need is that these staff could be transefer through network by telnet.)
Any hint is appreciated. Thanks in advance.
[ June 30, 2003: Message edited by: keisin syu ]
[ July 02, 2003: Message edited by: keisin syu ]
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
as far as I know you cant, but you can do one of a few other things, heres some options.
if it has to be text only, no GUI at all, then you can output the strings and ask the user to enter the values, either one at a time or all at once, where one at a time is probably more user freindly.
if you can use a GUI, then use something like showInputDialog and capture the users input.
both options are extremely simple to implement, and they're definately not the only ones, but AFAIK, you can't output those type screens and have a cursor placed at some field, because the console wont tell you co-ordinates clicked, and if it did you probably wouldn't want to maintain which fields are at those co-ordinates.
I'd go for a simple, lightweight, no frills no thrills type GUI for this
Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
Its possible keisin syu
here is the code.. try it out
System.out.println("---------------");
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
System.out.print("|");
System.out.print("Name:");
String name = br.readLine();
System.out.print("|");
System.out.print("Mon:");
String mon = br.readLine();
System.out.println("---------------");


SCJP, SCJD.
keisin syu
Greenhorn

Joined: Dec 04, 2002
Posts: 25
thank you all.
what I had thought about is that is there any library has a object called Graphic, (or other like this one) in the library of TurboC++ 3.0 or so, that can manipulate the console screen directly for outputing characters and placing the cursor at any postion, then wait for the user's keyboard input. this act as some remote terminal that has none process ability connectting to one server waiting for user's input.
but, as Sun said, it must be imposible to do so.
thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does it possible to draw text in console with java(like using TurboC++3.0)?