package swing.layouty;

import java.awt.BorderLayout;
import java.awt.Font;

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

public class Layout_Border {
	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);
		
		BorderLayout layout = new BorderLayout();
		okno.setLayout(layout);
		
		final JButton button1 = new JButton("A");
		button1.setFont(FONT);
		okno.add(button1, BorderLayout.CENTER);
		final JButton button2 = new JButton("B");
		button2.setFont(FONT);
		okno.add(button2, BorderLayout.NORTH);
		final JButton button3 = new JButton("C");
		button3.setFont(FONT);
		okno.add(button3, BorderLayout.WEST);
		final JButton button4 = new JButton("D");
		button4.setFont(FONT);
		okno.add(button4, BorderLayout.EAST);
		
		okno.pack();
		okno.setVisible(true);
	}

}
