package math.prime;

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

/**
 * ramka + panel
 */
public class Primes02 extends JFrame {
    private static final long serialVersionUID = 1L;

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> new Primes02(new SpiralaUlama(800, 800)));
    }

    public Primes02(JComponent comp) {
        JPanel panel = (JPanel) comp;
        setLayout(null);
        setPreferredSize(new Dimension(800, 800));
        int frameWidth = 800;
        int frameHeight = 800;
        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);
    }
}
