public MainFrame() throws IOException {

        frame = new JFrame("Sayısal Analiz Yöntemleri");
        frame.setSize(900, 400);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
        frame.setMinimumSize(new Dimension(900, 400));
        //frame.setResizable(false);

        gbc = new GridBagConstraints();

        panelL = new JPanel(new GridBagLayout());
        panelL.setVisible(true);

        panelR = new JPanel(null);
        panelR.setVisible(true);

        ImageIcon icon = new ImageIcon(getClass().getResource("bg.png"));
        JLabel label = new JLabel(icon);
        label.setBounds(0, 0, 500, 400);
        
        panelR.add(label);
        
        menuBar = new JMenuBar();
        menu1 = new JMenu("Dosya");
        menu2 = new JMenu("Düzen");
        menuBar.add(menu2);
        menuBar.add(menu1);
        
        frame.add(panelL);
        
        jl_prog_aciklama = new JLabel("Analiz Yöntemleri");
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.weightx = 0.5;
        gbc.weighty = 0.1;
        gbc.gridwidth = 1;
        gbc.gridheight = 1;
        gbc.anchor = GridBagConstraints.FIRST_LINE_START;
        gbc.insets = new Insets(30, 80, 0, 0);
        gbc.fill = GridBagConstraints.NONE;
        panelL.add(jl_prog_aciklama, gbc);

        cbx_yontem_sec = new JComboBox<String>(cbx_yontem_items);
        cbx_yontem_sec.setMaximumRowCount(11);

        gbc.gridx = 0;
        gbc.gridy = 1;
        gbc.weightx = 0.1;
        gbc.weighty = 1;
        gbc.gridwidth = 1;
        gbc.anchor = GridBagConstraints.FIRST_LINE_START;
        gbc.insets = new Insets(20, 20, 0, 0);
        gbc.fill = GridBagConstraints.NONE;
        panelL.add(cbx_yontem_sec, gbc);

        exit_button = new JButton("     Çıkış     ");
        gbc.gridx = 0;
        gbc.gridy = 3;
        gbc.weightx = 0.1;
        gbc.weighty = 0.1;
        gbc.gridwidth = 1;
        gbc.anchor = GridBagConstraints.FIRST_LINE_START;
        gbc.insets = new Insets(20, 20, 0, 0);
        gbc.fill = GridBagConstraints.NONE;
        panelL.add(exit_button, gbc);

        exit_button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });

        about_button = new JButton("     Bilgi     ");
        gbc.gridx = 0;
        gbc.gridy = 2;
        gbc.weightx = 0.1;
        gbc.weighty = 0.1;
        gbc.gridwidth = 1;
        gbc.anchor = GridBagConstraints.FIRST_LINE_START;
        gbc.insets = new Insets(20, 20, 0, 0);
        gbc.fill = GridBagConstraints.NONE;
        panelL.add(about_button, gbc);

        about_button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String aciklama = "Sayısal Analiz Yöntemleri Programı\nSayısal Analiz Dersi kapsamında geliştirilmiştir.\n"
                        + "Özgürce dağıtılabilir.\n"
                        + "Geliştiren: Çağdaş ÇAĞLAK\n"
                        + "E-posta: cagdascaglak@gmail.com ";
                JOptionPane.showMessageDialog(panelL, aciklama, "Bilgi", JOptionPane.INFORMATION_MESSAGE);
            }
        });
        cbx_yontem_sec.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
                cbx_index = cbx_yontem_sec.getSelectedIndex();

                switch (cbx_index) {
                    case 1://Grafik Yöntemi----------
                        grafik = new GrafikPanel();
                        panelL.remove(panelR);
                        panelR = grafik.getPanel();
                        panelL.add(panelR, gbc);
                        panelL.updateUI();
                        break;
                    case 2://Yarıya Bölme Yöntemi----------
                        bisection = new BisectionPanel();
                        panelL.remove(panelR);
                        panelR = bisection.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 3://Regula False Yöntemi----------
                        regulafalse = new RegulaPanel();
                        panelL.remove(panelR);
                        panelR = regulafalse.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 4://Newton Raphson Yöntemi----------
                        newton = new newton_panel();
                        panelL.remove(panelR);
                        panelR = newton.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 6://Trapez Yöntemi----------
                        trapez = new TrapezPanel();
                        panelL.remove(panelR);
                        panelR = trapez.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 7://Simpson Yöntemi----------
                        simpson = new SimpsonPanel();
                        panelL.remove(panelR);
                        panelR = simpson.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 9://Matris İnversi-----------
                        matris = new MatrixInversePanel();
                        panelL.remove(panelR);
                        panelR = matris.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    case 10://Gauss Eleminasyonu------
                        gauss = new GaussPanel();
                        panelL.remove(panelR);
                        panelL.updateUI();
                        panelR = gauss.getPanel();
                        panelL.add(panelR, gbc);
                        panelR.updateUI();
                        break;
                    default:
                        System.out.println("Boş");
                }
            }
        });

        gbc.gridx = 3;
        gbc.gridy = 0;
        gbc.weightx = 2;
        gbc.weighty = 1;
        gbc.gridwidth = 20;
        gbc.gridheight = 40;
        gbc.anchor = GridBagConstraints.FIRST_LINE_START;
        gbc.insets = new Insets(0, 0, 0, 0);
        gbc.fill = GridBagConstraints.BOTH;
        panelL.add(panelR, gbc);
    }