Re: Can we do this with println?



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.
.



Relevant Pages

  • Re: Weird Behaviour
    ... > ONE sentence in order to dispute this commonly understood meaning. ... Here's the problem IMO. ... Given this brain-dead method: ... But if java were PBR: ...
    (comp.lang.java.help)
  • Re: static class
    ... since at least Java 1.0.2, the initial release more than ten years ago. ... the situation was confused by adding a second meaning. ... Java 1.1 provides the option of declaring nested classes, ... To avoid confusion, they are often called ...
    (comp.lang.java.programmer)
  • Re: (Probably) easy question about inheritance
    ... Vector has specific meaning already in Java, ... If Vec extends Matrix then Vec has MORE fields and methods than ... The Java Glossaryhttp://mindprod.com ... Vectors for math purposes because that's what they're called, ...
    (comp.lang.java.programmer)
  • Re: Greek, glagolitic, cyrillic
    ... significantly change the meaning of the word. ... Java is the SUV of programming tools. ...
    (sci.lang)
  • Re: create my own class -- where to put it?
    ... I've been meaning to ask Frances. ... Why the heck do you not join the rest of the Java world and give ...
    (comp.lang.java.help)