Java console cursor movemenet

2019-09-17 11:48发布

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.

For example:

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

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)

1条回答
祖国的老花朵
2楼-- · 2019-09-17 12:07

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.

查看更多
登录 后发表回答