Re: Can we do this with println?
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 23:04:53 GMT
neelsmail@xxxxxxxxxxxxxx wrote:
on.. The problem is I do not get how using "System.out.println" I can
go one line above without erasing the whole screen. Of course this is
This kind of cursor control is not provided by Java. It can't, really, it's up to the output device to interpret the meaning of your output. Joshua's pointer to ANSI escape codes was a good one.
Remember Java is just sending out a stream of characters. What meaning does "go to the top of the screen" have when the output is being sent to a file? None really....
If you must have control over where things get put in a more device independent manner, Java Swing would be a good choice. You can just draw stuff where you want with the graphics API, or you can use a JEditorPane to put text in certain places like a word processor. All kinda depends on your final application.
.
- Follow-Ups:
- Re: Can we do this with println?
- From: Roedy Green
- Re: Can we do this with println?
- References:
- Can we do this with println?
- From: neelsmail
- Can we do this with println?
- Prev by Date: Re: File Open dialog bug in 1.6.0_03
- Next by Date: Re: [OT]
- Previous by thread: Re: Can we do this with println?
- Next by thread: Re: Can we do this with println?
- Index(es):
Relevant Pages
|