Project Summary
.java-string-literal {color: #99006b}
.java-layer-method {font-family: Monospaced; font-weight: bold}
.java-keywords {color: #000099; font-family: Monospaced; font-weight: bold}
Current Version:
1.01
Requires:
Java 1.3 or later
Download:
transplayout.jar (size: 15 kB)
Introduction
GUI forms have always been filled by setting up their children location and size. Layout management goal is just to keep the look right. Unfortunately, current JDK layout managers are too hard to use. Discovering how to set them up is tricky.
TransparentLayout is intended to lead developers to a more productive, less error-prone GUI building by acting in a fully transparent manner.
Usage
Just set the original component bounds (x, y, width, height) for building anything you need and get the job done. (No boilerplate code is required!)
See a sample code (TransparentLayoutDemo.java).
import net.java.dev.transparentlayout.*;
...
public class TransparentLayoutDemo
{
public static void main(String[] args)
{
JFrame f = new JFrame("TransparentLayout demo");
f.setLayout(new TransparentLayout());
...
f.add(component, new Rectangle(x, y, width, height));
...
f.setVisible(true);
}
}
The hack
TransparentLayout infers the appropriate resizing behavior from the original component bounds, allowing development in a very friendly manner.
The solution can be used either in command-line tools or in graphical ones.
Release
Grids no more! Download TransparentLayout now!
Installation
Copy the downloaded file (*.jar) to the JRE optional package
directory (/lib/ext/) and import the TransparentLayout package in your code. That's all!
Highlights
Highly
productive
World class
Rock solid(64 Test Cases Passed!)
Vote for RFC
If you believe that TransparentLayout can leverage the Java productivity, please vote for it in the Sun Bug Parade.
What about others?
Other layout management initiatives such as TableLayout, ExplicitLayout, FormLayout (aka JGoodies) and GroupLayout (aka Matisse) introduce yet another constraint to learn about. TransparentLayout uses well known Rectangle objects instead.
Authors
Everton Barbosa Gomes is a book writer and SCJP.
Cesar Nascimento is an anime enthusiast and an Java Senior Programmer currently working at IBM.