package math.shapes;

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

public class MainArrow extends JFrame{
	private static final long serialVersionUID = 1L;

	public static void main(String[] args) {
		SwingUtilities.invokeLater(() -> new MainArrow(new ArrowPanel()));
	}

	public MainArrow(JComponent comp){
		JPanel panel = (JPanel) comp;
		panel.setLayout(null);
		int frameHeight = 300;
		int frameWidth = 500;
		panel.setBounds(0, 0, frameWidth, frameHeight);
		//panel.setBounds(0, 0, 256, 256);
		setLayout(null);
		setPreferredSize(new Dimension(500, 300));
		setBounds((Toolkit.getDefaultToolkit().getScreenSize().width / 2)
				- (frameWidth / 2), (Toolkit.getDefaultToolkit()
				.getScreenSize().height / 2) - (frameHeight / 2), frameWidth,
				frameHeight);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("Ramka Graficzna");
		//	setResizable(false);
		add(panel);
		setVisible(true);
	}
}
