JPanel topLine = new JPanel();
topLine.setLayout( new GridLayout( 1, 3 ) );
topLine.add( new JLabel( "Putter object", JLabel.CENTER ) );
topLine.add( new JLabel( "The Store", JLabel.CENTER ) );
topLine.add( new JLabel( "Getter object", JLabel.CENTER ) );
getContentPane().add( topLine, BorderLayout.NORTH );
JPanel displayPanel = new JPanel();
displayPanel.setLayout( new GridLayout( 1, 3 ) );
displayPanel.add( putter );
displayPanel.add( store );
displayPanel.add( getter );
getContentPane().add( displayPanel, BorderLayout.CENTER );
addWindowListener( new WindowAdapter(){
public void windowClosing( WindowEvent e )
{
System.exit( 0 );
}
});
pack();
setVisible( true );