container.add(panel1);
container.add(panel2);
frame.getContentPane().add(container);
frame.pack();
container.setFocusCycleRoot(true);
container.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
panel1.setNextFocusableComponent(panel2);
assertNull(container.getFocusTraversalPolicy().getComponentBefore(container, panel1));
assertEquals(panel2, container.getFocusTraversalPolicy().getComponentAfter(container,
panel1));
assertEquals(panel1, container.getFocusTraversalPolicy().getComponentBefore(container,