clear screen...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: clear screen...

  1. #1
    kleric Guest

    clear screen...


    Regarding java applications...

    I've searched dozens of documents, tutorials, help sites, and message boards
    but couldn't find any decent method of clearing the screen.

    The best method I found was printing out 25 blank lines to scroll the text
    up. Kind of crude, I think.

    This would work for me, but how do I get the next output to appear at the
    top of the screen rather than at the bottom?

    kleric



  2. #2
    Paul Clapham Guest

    Re: clear screen...

    Back in the Dark Ages, when Windows didn't exist, there was a DOS device
    driver called ANSI.SYS. We would add a reference to this in our Config.Sys
    files and then we could use ANSI-standard escape codes (which looked like
    \027[1;1a) to position the cursor, clear the screen, change the colour of
    characters, and so on. In fact I still have a copy of the MS-DOS 5.0 User's
    Guide and Reference (copyright 1991, Includes 5.25" disks!) that has a whole
    section that describes how to do that.

    I'm assuming you are using Windows here, because I have no idea of how you
    might do this in Unix (probably with great ease). If you can find ANSI.SYS
    somewhere in your system, you might try configuring a DOS box that loads it,
    although if you do that I think you'll have to reboot your machine every
    time you want to use it. Or you might configure it into your Config.Sys.
    But I have no idea whether that would work or not. Then you'd have to get
    your hands on an antique DOS manual.

    What I'm trying to say here is, this seems like a lot of work to go through
    to support a technology that has been obsolete for several years. Why not
    write a GUI interface for your application?

    PC2

    kleric <kleric_@hotmail.com> wrote in message
    news:39ebe1fb$1@news.devx.com...
    >
    > Regarding java applications...
    >
    > I've searched dozens of documents, tutorials, help sites, and message

    boards
    > but couldn't find any decent method of clearing the screen.
    >
    > The best method I found was printing out 25 blank lines to scroll the text
    > up. Kind of crude, I think.
    >
    > This would work for me, but how do I get the next output to appear at the
    > top of the screen rather than at the bottom?
    >
    > kleric
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center