import java.awt.*;
import javax.swing.*;
public class FlowLayoutManagerExample extends JFrame {

	public FlowLayoutManagerExample (String title) {

		super(title);

		setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

		add(new JButton("one"));
		add(new JButton("two"));
		add(new JButton("three"));
		add(new JButton("four", new ImageIcon("brain.gif")));
		add(new JButton(new ImageIcon("brain.gif")));

		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(300, 200);
	}
	public static void main(String args[]) {
		FlowLayoutManagerExample frame = new FlowLayoutManagerExample("Flow Layout Example");
		frame.setVisible(true);
	}
}