The container creates a displayPanel that is displayed at its center using the default BorderLayout. On the left side, we add a JList control displaying the names of cards. At the bottom, we add a panel on which the Next and Previous buttons are placed using the default layout manager, which is a FlowLayout.
the button is on the panel,and panel have a layoutmanager of flowlayout
Share this highlighthttp://www.safaribooksonline.com/a/java-programming/26933/