package math.binary.binclock;

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

public class BCDClock01 extends JFrame {
    private static final long serialVersionUID = 1939780726190492835L;

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

    public BCDClock01(JComponent comp) {
        JPanel panel = (JPanel) comp;
        setLayout(null);
        panel.setBounds(0, 0, 210, 140);
        setPreferredSize(new Dimension(210, 140));
        int frameWidth = 210;
        int frameHeight = 140;
        setBounds((Toolkit.getDefaultToolkit().getScreenSize().width / 2)
                        - (frameWidth / 2), (Toolkit.getDefaultToolkit()
                        .getScreenSize().height / 2) - (frameHeight / 2), frameWidth,
                frameHeight);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setTitle("Zegar Binarny BCD");
        add(panel);
        setVisible(true);
    }
}
