I would like to create a writeable text box where a user can input text into it. A nice "send" button that the person could click to send the text to the server would also be nice.

I currently haven no idea how to do this and I do not see any tutorials on how to do this.

I am using LWJGL and Java, and also I am using the Slick2D library.


  • \$\begingroup\$ Could it be a standard windows input box or would you want to style it? \$\endgroup\$
    – Eejin
    Jun 8, 2014 at 11:33
  • \$\begingroup\$ @Eejin Currently I have no text box. Soo.... Any text box would be far better than no text box to start me off :). It would be nice if it was an in-application text box which can be stylized, but I cannot have everything and will take any solution that is better than nothing. \$\endgroup\$
    – joehot200
    Jun 8, 2014 at 14:41
  • \$\begingroup\$ lwjgl includes tinyfiledialogs which offers an input box. \$\endgroup\$
    – rolobo
    Sep 18, 2017 at 9:36

1 Answer 1


LWJGL is just a binding of OpenGL, a way to buffer data to your graphics hardware. Slick2D is a depreciated game library for rendering images, and telling LWJGL what to do.

Although, Slick2D does have a way to render True-Type font files as quadrilateral images. The TrueTypeFont class has more information on it.

Here's really good tutorial on NinjaCave: http://ninjacave.com/slickutil3

As for buttons, Slick2D does not natively support GUI. But there are really good libraries for GUI handling (With text integrated) The most popular and configuable is nifty-ui: http://nifty-gui.lessvoid.com/


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .