AWT

7. Create a simple AWT application that displays a Checkbox with Custom Layout.

            import java.awt.*;
            import java.awt.event.*;
            class MyFrame extends Frame
            {
                Checkbox cb = new Checkbox();
                MyFrame()
                {
                    setBounds(100,100,400,400);
                    setLayout(null);
                    cb.setBounds(100, 100, 50, 50);
                    add(cb);
                    addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e)
                        {
                            System.exit(1);
                        }
                    });
                    setVisible(true);
                }
            } 
             class Main {
                public static void main(String[] args) {
                    new MyFrame();
                }
            }
        

OUTPUT

checkbox custom