java - How to create a textbox in Gui that can hold my print statements? -


i'm trying make texted based game ask user series of questions similar how survey works. want make gui box these questions can asked , box can input answers. i've researched bit i'm not sure how text input answer because depending on how answer question, different action occurs. question how create text box can hold print statements , text box user can input answers.

if using swing: questions can use jlabel , set text in either through constructor or through settext() method.

as user answers can use jtextfield or jtextarea object (depending on expected size of user input) , call gettext() methods retrieve user input string.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -