In this month's article I introduce TableLayout, a robust but easy-to-use
LayoutManager for use in any Java Swing application. It's based very loosely
on the HTML TABLE paradigm, where components are placed in table cells in
row-major order. Vertical and horizontal alignment for the component in a
cell can be specified, and a component (cell) may span rows and columns. I
also present Forms-Panel, a JPanel sub-class that abstracts the underlying
TableLayout.
This article assumes you have some familiarity with the design and use of
LayoutManagers in Swing.
Background
I have been doing Java Swing applications for many years, and I've never been
comfortable using a GUI designer tool, both for the verbose and often
horrible Java code they produce and the lack of support for ... (more)
This article presents a data model based on a Collection implementation that
can be used with Swing components JList and JComboBox. It also discusses a
method to use these same concepts in constructing the user interface of an
application.
Overview
Java Collections are indispensable for building any application, whether GUI
or non-GUI. And the ArrayList class is a heavyweight in the java.... (more)
This article presents a Java/Swing component implementation of a feature that
is ubiquitous in nearly all desktop applications, particularly Windows
applications - an area in the lower right portion of a window (Frame) that
can be used to resize the window.
Of course, a window can be re-sized with most desktop managers by dragging
the lower-right edge - the additional component simply ser... (more)
In this month's article I continue my discussion of a list-based UI framework
that I started last month ("ArrayListModel," [JDJ, Vol. 10, issue 10]). The
primary concept behind this idea is a data model that contains elements that
describe parts of an application's user interface. Through a single model,
various aspects of the user interface can be controlled, manipulated, and
visually s... (more)