Results 1 to 9 of 9
Thread: Need For Clear Screen
- 03-06-2009, 09:31 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 2
- Rep Power
- 0
- 03-06-2009, 11:48 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can you explain what you want to do exactly? What your Clrscr() function do? You must provide more details if you want to find a solution.
- 03-06-2009, 06:07 PM #3
no api in java that does that. (non that i know of anyways.) just use println("\n\n\n\n\n\n\n\n\n\n\n\n");
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 03-06-2009, 11:06 PM #4
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
what angryboy said, but you may want to use an excess of line breaks. it really depends on the size of the terminal.
- 03-06-2009, 11:51 PM #5
i here by declare the first java clrscr()!!
i think 10k \n should be enought on both unix and dos.Java Code:public static void clrscr(){ for(int i=0; i<1000; i++) System.out.print("\n\n\n\n\n\n\n\n\n\n"); // a set of 10 newlines. }USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 03-07-2009, 03:29 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Is this what our thread starter wants to find? He's talking about clearing up something, here just printing large number of new line characters. So not empty, right.
- 03-07-2009, 06:43 AM #7
Eranga: What the OP is looking for is a "clear screen" method ... sort of like what C has. This method doesn't exist in Java, so what AB suggests is to just print an enormous amount of new lines to clear the screen.
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 03-07-2009, 06:58 PM #8
thanks for clearing that up chris. :)
actually, i realize that you can't always assume there is a console to print to. So its better to use Console.printf instead (if its not null, that is).USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 03-08-2009, 08:41 AM #9
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Blank Screen while navigating from one screen to another
By mohana.krishna in forum Java ServletReplies: 0Last Post: 03-03-2009, 05:03 PM -
Clear Screen in Console based programs
By kirly in forum New To JavaReplies: 5Last Post: 02-05-2009, 05:59 AM -
Please clear my doubt...............
By vinaytvijayan in forum Advanced JavaReplies: 0Last Post: 12-26-2007, 06:23 PM -
Help, someone clear up Interfaces for me
By mathias in forum New To JavaReplies: 1Last Post: 08-06-2007, 02:26 AM -
Clear screen in java
By lenny in forum New To JavaReplies: 1Last Post: 07-30-2007, 09:43 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks