package swing.layout;

import java.awt.FlowLayout;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JFrame;

public class Layout_Flow {
	private final static Font FONT = new Font("Arial", Font.BOLD, 30);

	public static void main(String[] args) {
		final JFrame okno = new JFrame();
		okno.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		FlowLayout layout = new FlowLayout();
		okno.setLayout(layout);
		
		final JButton button1 = new JButton("A");
		button1.setFont(FONT);
		okno.add(button1);
		final JButton button2 = new JButton("B");
		button2.setFont(FONT);
		okno.add(button2);
		final JButton button3 = new JButton("C");
		button3.setFont(FONT);
		okno.add(button3);
		final JButton button4 = new JButton("D");
		button4.setFont(FONT);
		okno.add(button4);
		final JButton button5 = new JButton("E");
		button5.setFont(FONT);
		okno.add(button5);
		final JButton button6 = new JButton("F");
		button6.setFont(FONT);
		okno.add(button6);
		final JButton button7 = new JButton("G");
		button7.setFont(FONT);
		okno.add(button7);
		final JButton button8 = new JButton("H");
		button8.setFont(FONT);
		okno.add(button8);
		
		okno.pack();
		okno.setVisible(true);
	}

}
