Sample Code: About Box
// Create About Box, setting title and description
//
VAboutBox aboutBox = new VAboutBox();
aboutBox.setTitle("My Tool 1.0");
aboutBox.setDescription(
"Long-winded Copyright notice\nthat only a lawyer can comprehend");
// Add some extra space below the copyright text, otherwise
// the default icons at the bottom will crop some of the text.
// The space we add must be relative to the current font.
//
Dimension d = aboutBox.getMinimumSize();
FontMetrics fm = aboutBox.getFontMetrics(aboutBox.getFont());
d.height += (2 * fm.getHeight());
aboutBox.setMinimumSize(d);
// Create container for About box
//
JFrame consoleFrame = (Jframe)(properties.getPropertyObject(VConsoleProperties.FRAME));
VDialog container = new VDialog(consoleFrame, true);
aboutBox.setContainer(container);
// Set title for container
//
container.setTitle("About My Tool");
// Put it all together and render
//
container.getContentPane().setLayout(new BorderLayout());
container.getContentPane().add(aboutBox, BorderLayout.CENTER);
container.pack();
container.showCenter(consoleFrame);