Table2GridBag is a commandline utility for Java developers, having or wanting to use the AWT GridBagLayout layoutmanager. It's purpose is to convert a layout, provided as an HTML table, into an equivalent configuration for the GridBagLayout layoutmanager.

Java's GridBagLayout is shunned by many developers because it is difficult and time-consuming to configure. Even simple designs can easily take up to several hours to get them look right and may consume several hundred lines of code after being finished. Furthermore, such handwritten code tends to be utmost difficult to maintain and almost impossible to change without messing up the entire layout.

With Table2GridBag, creating a GridBagLayout configuration for a GUI application becomes as easy as specifying it as a HTML table with the names of the components to layout in the table cells. Running the table through the utility will then produces either copy & paste layout code or a complete, ready to use Java class, resembling the specified layout.

In short, the advantages of using Table2GridBag are:

  • Automatic generation of Java code from the much more compact HTML language (less code to type).
  • Using an actual layout language (HTML) to specify the placement of GUI widgets instead of fiddling around with configuration parameters.
  • Huge saving of time, since the layout can be tested without having to recompile and start the application after every layout modification.
  • Layout specification can be completely uncoupled from software development, allowing for clean separation of concerns (Alice can do GUI requirement analysis and pass her work to Bob without needing to rely on screenshots of dialogs).

For further information, please be sure to read the handbook (link in the sidebar).


Sponsored links


FilenameSizeMD5 Checksum
table2gridbag-1.6.jar12 KBe5c7bc1b32f4494fd4261d684f35def4