import java.awt.*;
import javax.swing.*;

public class FlowLayoutTest extends JFrame {
    public FlowLayoutTest() {
        setTitle("FlowLayoutTest");
        setSize(300, 150);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLayout(new FlowLayout(FlowLayout.LEFT, 10, 15));

        add(new JButton("Button1"));
        add(new JButton("Button2"));
        add(new JButton("Button3"));
        add(new JButton("Button4"));
        add(new JButton("Button5"));
        setVisible(true);
    }
    public static void main(String argv[]) {
        SwingUtilities.invokeLater(() ->	new FlowLayoutTest());
    }
}