• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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("---------------");
 
keisin syu
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic