Java - programming a two-way console window

旧时模样 提交于 2019-12-25 16:57:19

问题


I am interested in creating a text-based game in Java and am wondering how I would replicate the common server console (ie: nogui server mode in the minecraft-server for example) - as in there is always a line at the bottom of the console for input, and everything else above it is output which can be written to asynchronously.

How would I get started on this? I am unfamiliar with the terminology regarding this sort of stuff and also what libraries to use to begin with.


回答1:


You should take a look to Java curses library. I haven't use it but, it looks like what you want.




回答2:


This library may well be helpful: I created it in order to implement a small Rogelike game in Java:

  • https://github.com/mikera/swing-console

It uses Swing to create a simulated console-style window.



来源:https://stackoverflow.com/questions/12619676/java-programming-a-two-way-console-window

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!