What is TWL

TWL is a graphical user interface library for Java built on top of OpenGL. It provides a rich set of standard widgets including labels, edit fields, tables, popups, tooltips, frames and a lot more. Different layout container are available to create even the most advanced user interfaces.

With the TextArea class TWL also features a powerful HTML renderer which supports a subset of XHTML/CSS: floating elements, tables, images, unordered lists, text alignment, justified text and background images. See the TextArea Demo for details. It is perfectly suited to create NPC chat dialogs in games or integrated help systems.

As games have a high demand on visual identity, TWL provides a very flexible theme manager. The theme manager decouples the visual representation of widgets from the code. Themes are specified in XML and PNG files with full alpha blending for effects such as glow or shadows. These themed can be created using the TWL Theme Editor, which also includes a powerful tool to create bitmap fonts from TrueType fonts.

TWL is also supported on Android but to use it an Android compatible renderer needs to be written

A Scala API is now also available

Screenshots
A simple look A very simple look. It is based on a set of borders, a few icons and gradients. This theme can be used as a starting point to create your own themes.
Blue glow (c) Eforen A complex look with blue glow as major design element. The glow extends outside of the widgets. This theme demonstrates the power of the theme engine.
Demo
General demos:
Demos for the TextArea widget:
Tools:
Downloads
twl.zip The complete content of the repositories TWL and TWLExamples in a single ZIP file.
It also contains all required external libraries including natives.
Download this file if you are unsure what to download.
TWL.jar Precompiled TWL library
TWL-android.jar Precompiled TWL library for android. The LWJGL renderer is not included and all usages of the java.beans.* package are replaced with a minimal version in the de.matthiasmann.twlbeans.* package.
twl-src.zip Complete library source code in a ZIP file
xpp3-1.1.4c_all.zip An implementation of the XMP1 API which is needed by TWL. This is a locally mirrored link as the original website seems to be broken.
TWLSlick.zip An extension for Slick's StateBasedGame to use TWL as UI. See Integrating TWL into StateBasedGame on the TWL wiki.

PNGDecoder.jar TWL's fast PNGDecoder. This is a very small (below 10KB) stand alone JAR which makes decoding PNG images very easy.
This is a subset of the TWL.jar and contains the same classes in the same package.
Source

TWL is provided under a modified BSD license. The source code is available via Mercurial SCM. The complete repository can be download as .zip or .tar.gz file by using the repective links on each repository page.

Valid HTML 4.01 Transitional Valid CSS!