How i can clear the screen in JAVA?, in c++ is command that called .......
system("cls")
but in JAVA??
thx
gicio1
system("cls") is the silly way to do it. For a start, "cls" isn't on most computers, because most computers call it "clear". You could run this from Java using Runtime.exec("clear"), Runtime.exec("cls"), etc .. but the best way to clear the screen is still to print out N newlines, where N is the height of the screen.
The only problem with this way is, you don't know the height of the screen. You could pass an environment variable in as a system property, from whatever launches your program, and if it's not there "assume" it's 200 or something. Then just build up a string with "\n\n\n\n\n\n\n\n"... and print it out. Blam, blank screen. :-)
Similar Messages
-
How to clear the screen in java?
Hi,
How to clear the screen in java without using any loops?
ThanksJust paint with your background color to let the old paintings vanish.
-
How do I clear the screen in console application?
In C or C++ we can clear the screen by clrscr() function.
How can I acheive something similiar to this in JavaHi,
Take a look at the below link may help you
http://www.codeguru.com/forum/archive/index.php/t-323058.html
This forum is exclusively related to discussions about Sun java Studio Creator. Henceforth please post these threads to an appropriate forum.
MJ -
How do I clear the Screen Saver?
How do I clear the Screen Saver from showing the photos on my phone?
You must have set it to use your photo stream as the screensaver. You can go into settings - screensaver to change to a different source.
-
How do I clear the screen in text mode (cls)
How do I clear the screen in text mode (cls)
Thanks,Clearing of console is an OS specific command, so
in case of Windows you should try:
Runtime.getRuntime().exec("cls");Though it wouldn't help, because exec() will be done as a separate
process... :)
Paul -
How we can recover the screen resolutions on maverick
how we can recover the screen resolutions on maverick
Hi
Deleting invoice is a data base action that deletes the record from the table and won't right these records to any history tables. The only way is to re enter the invoice from hard copy. Where as Cancel invoice will behave differently.
Is it manual invoice or invoice created from ERS etc? -
Does anybody know how to Clear the screen in Java?
Hi guys,In C we use System Clear.
In java,which instructions shall i use in order to clear the screen?
Thanks,in advance!Of course you shouldn't do so anyway...
Terminal programs should coexist with all other terminal programs and not try to dominate the screen.
They should never clear the screen as this would remove output from other programs running in the same terminal. -
How do I clear the screen?
Hello,
I would like to know how to clear the screen. What is the code for it?
Ernest_EHi,
Look to the left. There is a search field there. This question is often asked. The short answer is that you can't do it.
/Kaj -
Clearing the screen using java
hi
how to clear the screen using a java programfor (int n = 0; n < 24; n++) System.out.println();
Even better: don't clear the screen. The program I ran before your program printed out very important things. If your program throws away those important things then I will not like you or your program. -
How we can loop the screen table.
Hi All,
We are used loop the screen table but it is a structure how we are able to do this what sap doing behind this can any body please tell me.
Thanks,
Saleem.Hi
SCREEN is a structure only.
But when you create a screen or selection-screen; the program which controls your screen or selection-screen creates an internal table with header line of type SCREEN.
So in your program SCREEN is an internal table, you can always loop it.
To understand it better, write some parameters and select-options in a report program; in debugging mode see the details of SCREEN table.
Regards
Surya. -
Does anyone know how I can record the screen and myself at the same time?
I have seen videos of people using their isigght camera to record their screen and a video of them is in the shape of a square on top of a corner of the screen.
Does anyone know how I can do that?macnewcomer22 wrote:
I have seen videos of people using their isigght camera to record their screen and a video of them is in the shape of a square on top of a corner of the screen.
Does anyone know how I can do that?
I'm not certain I know what you want to do, but consider these ideas:
(1) If you have seen a video of people doing it, the people who made the video surely know how. Ask them if you can.
(2) You may be able to do what you want with this app:
http://b-l-a-c-k-o-p.com/CamCamX.html
(3) The easiest way I was able to record my screen and simultaneous video of me in a window in the top corner of my display was to use two webcams. I used QuickTimeX to make a screen recording while I used my built-in iSight to show me moving in my Photo Booth window on the display.
EZ Jim
Mac Pro Quad Core (Early 2009) 2.93Ghz w/Mac OS X (10.6.4) MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.4)
LED Cinema Display G4 PowerBook 1.67GHz (10.4.11) iBookSE 366MHz (10.3.9) External iSight -
How to clear the screen in the command prompt?
Hello Everyone,
I was wondering how we can clear the screen in the command prompt in Java. I remember we can do this in C by writing system("cls");
What is the best IDE for writing Java programs. Is the NetBeans IDE good? Thank you very much.I was wondering how we can clear the screen in the
command prompt in Java. I remember we can do this in
C by writing system("cls");I guess there's no Java way of doing that because it's a function of the shell you're calling. If you try to use Runtime.exec on cls, it starts yet another shell, clears that, and closes it again, so it has no effect on your output.
You could try using the '\b' backspace character, if that helps.
What is the best IDE for writing Java programs. Is
the NetBeans IDE good? Thank you very much.By the way you're asking this question, the answer will be almost certainly "none". If you want to, you can search this board for the few million times this question was asked before, pick all IDEs suggested there and use the one you're most comfortable with. -
I realize this has probably been covered before but how do you clear the screen of previous lines of code?
I am using Crimson Editor and the latest SDK and running programs in a DOS shell.
Please let me know how to do it, if it is a DOS command how to implement into my program and if a java method what the parameters are.
Thanks.If you are wanting to clear the DOS window, there is no provision in Java for that. You could output new lines from your program and force the data on the screed to scroll off.
The DOS command to clear the screen is "cls" and you will need to use runtime method. Search the forums for that method, there are literally hundreds of posts on the subject. The search is in the upper right corner. -
How do I clear the Disco cache on App Server 9.0.4
Can anyone tell me how I can clear the Discoverer cache installed on 9.0.4 Oracle App Server? Can it be done using App Server Control, is there command line syntax I can use?
Thanks
AndyHi Andy
I think the only way to get the memory back is to bounce the server. Sorry.
Best wishes
Michael -
How do I clear the download folder in my new iPad?
I have somehow accumulated about 300 songs that display a download error message, tap to retry. The songs are, in fact, on my IPad. How do I clear the download folder of all of these messages that will not go away?
Unfortunately, the Client ID display does not always work correctly on all devices.
Soon, you may notice that other items that were previously displayed with the Client ID may now display just as an IP address......and your new iPad may "switch" from the previous IP address display to the Client ID display.
Then, things may change around again in a week or two. It's a bug that hopefully Apple will fix on the next firmware update.
Maybe you are looking for
-
Can I use an external GPS Receiver via Bluetooth?
Great phone. I used a Galaxy Nexus for over a year until I got this phone, but once I started using the Z10, I never looked back. The "Hub" is a GREAT feature, exactly what I use most of the time. Oddly enough, I was never much of a BB fan until t
-
I have no idea whats wrong but imac 8,1 dosnt show on the list someone help please?!
-
Environment: Win XP After renaming the hostname, while re-starting the EM, I am getting the following error. "Enterprise Manager is not able to connect to the database instance. The state of the components are listed below. See below, EM Login Page.
-
Hi all My question is about how to make websites work in different languages. As I operate my business with customers throughout INDIA I need to present my website in several languages. How does this work? Once I have the text translated, do I have t
-
Hi All I'm using a Cisco 5760 with 3.3 code with a Cisco 2504 acting as an anchor. The 2504 is running 7.5 code and has 'New Mobility' (Converged Access) enabled. I can't fine any reference to what ports are now used between the controllers. I'm assu