Java控制台游标movemenet [英] Java console cursor movemenet

查看:67
本文介绍了Java控制台游标movemenet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Java控制台中以某种方式移动光标吗?

Can I move the cursor somehow in Java console ?

我想打印出整个页面并向后移动光标,用户可以填写表格

I would like to print out a whole page and move the cursor back and the user can fill out the form.

例如:

Username:         .......
Password:         .......
Re-enter passwor: .......

当用户第一次开始键入它时,它应该出现在第一条虚线上,然后按Enter键,然后按第二条虚线,依此类推。

When the user first start typing it supposed to appear on the first dotted line, presses Enter, then the second dotted line and so on.

有人对此有解决方案吗?
(对于整个控制台来说,一个回车对我来说绰绰有余)

Does anyone has got a solution for this? (A single "return carriage" for the whole console would be more than enough for me)

推荐答案

。为此,您需要JCurses或类似的库。

Not easily. You'd need JCurses or similar library for that.

文本模式已不再流行,因此对这种功能的支持很差。改用图形环境更容易。

Text mode isn't so popular anymore, so the support for that kind of functionality is poor. It's easier to switch to graphical environment instead.

这篇关于Java控制台游标movemenet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆