Results 1 to 9 of 9
  1. #1

    Default Clear Screen command in java


    Please give an idea of the clear screen command in java. Just like the clrscr() in Turbo C... pls

  2. #2
    PHP Code:
    for(i=1i<=25i++){
    System..out.writeln("\n");

    In short, walay clrscr(); command just like in C/C++
    Last edited by ChaosOrb; 02-17-2010 at 10:34 PM.

  3. #3
    Hehehe.. Nangutana pud ko ana sa una katong first time ko nag Java gikan ug C and C++. As far as I know wala.. Pwede but dili worth it.. Kung curious jud kaayo ka, do a little googling.. I think your instructor won't mind if dili ma clear imo console screen.. He probably knows nga wala.. hehehe..

    Kung naa ka makitan.. post ha.. Dugay ra na nga pangutana wa ko katubag.. hehehe

    Happy Hunting!!

  4. #4
    Java was not designed on a console applications.

  5. #5
    Quote Originally Posted by ChaosOrb View Post
    PHP Code:
    for(i=1i<=25i++){
    System..out.writeln("\n");

    In short, walay clrscr(); command just like in C/C++

    Ok, thanks a lot.. i was actually looking for the solution of this problem a long, long time ago pero wajud... God bless!

  6. #6
    Runtime.getRuntime().exec("cls"); if using Windows, but if not change "cls" to "clear"

  7. #7
    Quote Originally Posted by josephG View Post
    Runtime.getRuntime().exec("cls"); if using Windows, but if not change "cls" to "clear"
    I think dili na mo gana. File not found exception na siya.. I think cls is only a command within the command prompt not an executable in Windows.

  8. #8
    System("cls") works for C, so I'm guessing Runtime.getRuntime().exec("cls") also works for java.

  9. #9
    Quote Originally Posted by ChaosOrb View Post
    PHP Code:
    for(i=1i<=25i++){
    System..out.writeln("\n");

    In short, walay clrscr(); command just like in C/C++

    good only if the screen is 25 rows long [default screen size (windowed/fullscreen)].

    its best to invoke the "system + cls" command like System() and exec() for C/C++/Java as it would clear the whole screen of any sizes.

    no offense bro..., just adding up

  10.    Advertisement

Similar Threads

 
  1. Need help in JAVA plsss.. help 25problems..
    By FrozenBoi in forum Programming
    Replies: 89
    Last Post: 02-09-2010, 02:26 PM
  2. How to clear buffer in Java?
    By ares623 in forum Programming
    Replies: 17
    Last Post: 09-22-2009, 11:20 AM
  3. Is this possible in Java
    By Tin_Tin in forum Programming
    Replies: 12
    Last Post: 03-14-2009, 12:26 AM
  4. image bigger than its panel in java
    By manick in forum Programming
    Replies: 4
    Last Post: 09-11-2008, 08:55 PM
  5. how to display "RUN command" in start menu?
    By jouho in forum Networking & Internet
    Replies: 17
    Last Post: 09-20-2007, 12:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top