private JPanel getTableMakananDikonsumsiPanel(){
        JPanel panel = new CusomJPanel(new BorderLayout());
        String [] columnName = {"Nama Makanan", "Jumlah" , "Waktu Makan" , "Total Karbohidrat", "Total Protein", /*"Total Kalori",*/ "Total Lemak"};
        customTableModelMakananDikonsumsi = new CustomTableModel<MakananDiKonsumsi>() {

            @Override
            public Object getDataItem(MakananDiKonsumsi data, int column) {
                if(column == 0){
                    return data.getBahanMakanan().getNamaBahanMakanan();
                }
                else if (column == 1){
                    return data.getJumlah()+ "";
                }
                else if (column == 2){
                    return data.getWaktuMakan() + "";
                }
                else if (column == 3){
                    return data.getKarbohidrat()+ "";
                }
                else if (column == 4){
                    return data.getProtein()+ "";
                }
//                else if (column == 5){
//                    return data.getKalori()+ "";
//                }
                else if (column == 5){
                    return data.getLemak()+ "";
                }
                else {
                    return "";
                }
            }
        };
        customTableModelMakananDikonsumsi.setColumnName(columnName);
        customTableModelMakananDikonsumsi.setListData(makanDikonsumsiController.getListMakananDikonsumsi());
        tableMakananDikonsumsi = new JTable(customTableModelMakananDikonsumsi);
        tableMakananDikonsumsi.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                JTable table = (JTable) e.getSource();
                Point p = e.getPoint();
                selectedIndex = table.rowAtPoint(p);
                if (e.getClickCount() == 2) {
                    SimpanMakananDikonsumsiFrame simpanMakananDikonsumsiFrame = new SimpanMakananDikonsumsiFrame(makanDikonsumsiController, UPDATE_MODE, selectedIndex);
                }
            }
        });
        customTableModelMakananDikonsumsi.createRowSorter(tableMakananDikonsumsi);
        JScrollPane scrollPane = new JScrollPane(tableMakananDikonsumsi);
        panel.add(scrollPane, BorderLayout.CENTER);
        
        JButton buttonTambah = new CustomJButton("Tambah");
        buttonTambah.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
//                JOptionPane.showConfirmDialog(null, "Tambah", "Pesan", JOptionPane.OK_OPTION);
                SimpanMakananDikonsumsiFrame simpanMakananDikonsumsiFrame = new SimpanMakananDikonsumsiFrame(makanDikonsumsiController, INSERT_MODE, -1);
            }
        });
        JButton buttonHapus = new CustomJButton("Hapus");
        buttonHapus.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                if (selectedIndex == -1) {
                    JOptionPane.showConfirmDialog(null, "Anda belum memilih data", "Pesan", JOptionPane.ERROR_MESSAGE);
                    return;
                }
                if (JOptionPane.showConfirmDialog(null, "Apakah anda ingin menghapus data ini?", "Pesan", JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
                    makanDikonsumsiController.delete(selectedIndex);
                    selectedIndex = -1;
                }
            }
        });
        JPanel flowPanel = new JPanel(new FlowLayout());
        flowPanel.add(buttonTambah);
        flowPanel.add(buttonHapus);
        panel.add(flowPanel, BorderLayout.SOUTH);
        return panel;
    }