Hi
Hmmm... firstly, check your Runtime.exec() code. If it's right, that's a
shame.
Secondly, there's two ways to clear a screen.
1) Output 25 lines of blank lines.
Downside: You end up with cursor at bottom of screen.
2) Output the ANSI Escape codes for clear screen.
Downside: DOS must support ANSI.
It might look something like:
System.out.print("\033[2J");
Nicholas
> Delivered-To: [EMAIL PROTECTED]
> From: "Pepelis, Aaron" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: cls
> Mime-Version: 1.0
> X-Beenthere: [EMAIL PROTECTED]
> X-Mailman-Version: 2.0.1
> List-Help: <mailto:[EMAIL PROTECTED]?subject=help>
> List-Post: <mailto:[EMAIL PROTECTED]>
> List-Subscribe: <http://eos.dk/mailman/listinfo/swing>,
<mailto:[EMAIL PROTECTED]?subject=subscribe>
> List-Id: Java Swing Programming <swing.eos.dk>
> List-Unsubscribe: <http://eos.dk/mailman/listinfo/swing>,
<mailto:[EMAIL PROTECTED]?subject=unsubscribe>
> List-Archive: <http://eos.dk/pipermail/swing/>
> Date: Tue, 19 Jun 2001 12:21:06 -0400
>
> ok.. I was to clear the commandline screen (in windows) after my GUI pops
> up...
> I tried:
> public void clearScreen()
> {
> try
> {
> if (System.getProperty("os.name").toLowerCase().startsWith("win"))
> {
> Runtime.getRuntime().exec("cls\n\r");
> }
> }
> catch (IOException e)
> {
> System.out.println("error:" +e.toString());
> }
> System.out.println("end clearScrean");
> }
>
>
> but it didn't work...
> any ideas?
> thanks
> rev aaron
===========================================================================
Nicholas Wright Imperial Software Technology Senior Software Engineer
---------------------------------------------------------------------------
Email : [EMAIL PROTECTED] or [EMAIL PROTECTED]
Kings Court 120 Hawthorne Ave, #101
185 Kings Road Palo Alto
Reading RG1 4EX United Kingdom California 94301 USA
Tel: +44 118 958 7055 Tel: 650 688 0200
FAX: +44 118 958 9005 FAX: 650 688 1054
===========================================================================
****** VISAJ AT http://www.ist.co.uk/visaj ******
===========================================================================
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing