Ah, I see. Thanks for the clarification. As far as I know, there is no similar method in standard Java, that if you want this functionality in the console, you have to use outside libraries (perhaps JCurses as noted above) or create a GUI.

What is the difference b/w Applet & JApplet?

Applet and JApplet are both ways to allow you to embed a GUI in an HTML page. Applet uses the older AWT libraries while JApplets use the newer, more powerful and robust Swing libraries. If you are planning to program Java GUIs, I recommend that you go with Swing.