public void test(TestHarness harness)
{
JTextField ftf = new JTextField("HELLO WORLD");
JPanel borderPanel = new JPanel(new java.awt.BorderLayout());
borderPanel.add(ftf);
LayoutManager2 lm = (LayoutManager2) borderPanel.getLayout();
Dimension max = new Dimension (Integer.MAX_VALUE, Integer.MAX_VALUE);
// Check that the layout manager returns Integer.MAX_VALUE for both
// max dimensions, regardless of whether or not there's a border
harness.check (lm.maximumLayoutSize(borderPanel), max);
borderPanel.setBorder(new javax.swing.border.TitledBorder("HELLO WORLD"));
harness.check (lm.maximumLayoutSize(borderPanel), max);
// Check that maximumLayoutSize isn't affected by the layout size of
// the contained components
ftf.setMaximumSize(new Dimension (0,0));
harness.check (lm.maximumLayoutSize(borderPanel), max);
// Check that maximumLayoutSize returns Integer.MAX_VALUE even for null
// arguments
harness.check (lm.maximumLayoutSize(null), max);
// Check that a brand new BorderLayout unassociated with any Component
// also returns Integer.MAX_VALUE for a null argument.
BorderLayout bl = new BorderLayout();
harness.check (bl.maximumLayoutSize(null), max);