Code Comments
Programming Forum and web based access to our favorite programming groups.I would like to "draw" polygons on console (black) screen in "text mode". That is, to draw '**'s instead of lines. Purpose is to let students activate polygon methods and see it on screen, even before they learn AWT and graphics. I wonder if there are freeware classes doing this. If not, how do I do gotoXY() in black console screen. That is, how do I control the cursor position ?. Also, is there a clearScreen () method ? How do I find the actual dimentions (in characters) of the screen ? (not necessarily 25X80). Or, how do I maximize it ? Thanks, Memi (highschool teacher)
Post Follow-up to this messageOn 30 Oct 2004 10:08:37 -0700, Avraham wrote: > ....Purpose is to let students > activate polygon methods and see it on screen, even before they learn > AWT and graphics. I don't see the point of using Java to (try to) interact so closely with the command line. It is not a language well suited for it and it destroys the x-platform nature of Java for the sake of a few lines on the screen. If your students are so hungry for pretty lines, it would be better to give your students a quick taste* of Java GUI's with a single frame where you overide paint. (* Simple example to be explained later in the course.) My 2c worth. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane
Post Follow-up to this messageOn 30 Oct 2004 10:08:37 -0700, Avraham <niv444@walla.co.il> wrote: > I would like to "draw" polygons on console (black) screen in "text > mode". > That is, to draw '**'s instead of lines. Purpose is to let students > activate polygon methods and see it on screen, even before they learn > AWT and graphics. > > I wonder if there are freeware classes doing this. > > If not, how do I do gotoXY() in black console screen. That is, how do > I control the cursor position ?. Also, is there a clearScreen () > method ? > > How do I find the actual dimentions (in characters) of the screen ? > (not necessarily 25X80). Or, how do I maximize it ? Not in the default SDK, since there is hardly any way to make such a facility platform-independant. You might have a look at the console library for your platform, though, and see if anyone wrote JNI-Bindings for it. See you Stefan -- Whom the gods wish to destroy they first call promising.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.