package math.autos;

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

public class Autos06 extends JFrame {
    private static final long serialVersionUID = -2341107131516119572L;

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            int[] arr = {0, 1, 0};
            new Autos06(new AutomatonPanel(156, arr, Ksztalt.KWADRAT,
                    Color.BLUE));
        });
    }

    public Autos06(JComponent comp) {
        setLayout(null);
        int fh = 1000;
        int fw = 1000;
        setPreferredSize(new Dimension(fw, fh));
        setBounds((Toolkit.getDefaultToolkit().getScreenSize().width / 2)
                        - (fw / 2),
                (Toolkit.getDefaultToolkit().getScreenSize().height / 2)
                        - (fw / 2), fw, fh);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setTitle("Ramka Graficzna");
        //	setResizable(false);
        JPanel panel = (JPanel) (comp);
        panel.setLocation((fw - panel.getWidth()) / 2,
                (fh - panel.getHeight()) / 2);
        add(panel);
        setVisible(true);
    }
}
