Clearing screen using scrollbars (Java)

I was going through this thread and I was wondering, if maybe we could use the scroll-bars to do that?

How to Use Scroll Panes describes how to do things using scroll bars. If I am making a terminal based application using Java for a Linux OS, then can't I use code that will move the terminal knob/scrollbar move down further? I mean, that is how even the BASH "clear" works, right? So, maybe this console-based Java app can move the console scroll down and pretend to clear the screen?

Now, my problem is that I am unable to find any class within this "Scroll Pane API" documentation that would help me do that. If anyone has worked with this API before can help me, it would be much appreciated!


..maybe we could use the scroll-bars to do that?

No. You cannot 'wrap the CLI in a JScrollPane (or add any JScrollBar instances)'. It is a native component that is outside the control (beyond textual output) of Java.

Need Your Help

SQL - Compare Data from the same table

sql oracle oracle11g

I have the below table with following columns -

How objects in a game communicate

c# oop game-engine

Consider a game engine that utilizes a scene. Now, a scene can have a list of actors, which are the objects in the current scene. The pseudo for this might look like: